|
Posted by RedGrittyBrick on May 2, 2008, 10:55 am
Please log in for more thread options RedGrittyBrick wrote:
> Amy Lee wrote:
>> Hello,
>>
>> There's a problem while I'm processing sequences. My file content.
>>
>>> seq1
>> ATGCCCTGACGTAAACGTAGGCTACG
>>> seq2
>> GCATGCCCTACGGGTACCCCAGTA
>>
>> And I hope I can reverse the sequences to be this.
>>
>>> seq1
>> GCATCGGATGCAAATGCAGTCCCGTA
>>> seq2
>> ATGACCCCATGGGCATCCCGTACG
>>
>> I use "reverse" to do this, but it dose not work any more.
>> So could you tell me how to solve this problem?
>>
>
> reverse needs a list
>
> $ perl -e '$x="GCAT";$y=join"",reverse(split "",$x);print"$y\n"'
> TACG
>
Oh no it doesn't! How embarassing.
perl -e '$x="GCAT";$y=reverse($x);print"$y\n"'
TACG
--
RGB
|