2010/6/13 Richard Hainsworth <rich...@rusrating.ru>:
> Your revcom can be replaced with a single line using core perl6 functions.
> I'll give an example that currently works on rakudo for a simple string,
> but you can put it into the loop.
> <start example>
> my $sq='ccgacaacgaatatacgggctgtttgcttgcgtttgagaggtcgtattcccagatgcgta';
> say $sq.trans(['A','T','G','C','a','t','g','c'] =>
> ['T','A','C','G','t','a','c','g']).reverse;
> <end example>

That can also be translated "in spirit" back to p5-

my $_='ccgacaacgaatatacgggctgtttgcttgcgtttgagaggtcgtattcccagatgcgta';
print scalar reverse,"\n";

Reply via email to