Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[shootout/revcomp.p6.pl] replace loop with for
no idea why looping didn't work
  • Loading branch information
gerdr committed May 8, 2012
1 parent 1ce1e53 commit dde18a0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions shootout/revcomp.p6.pl
Expand Up @@ -19,12 +19,9 @@
sub print_revcomp() {
return if not $desc;
say $desc;
#$seq = $seq.flip.trans('wsatugcyrkmbdhvnATUGCYRKMBDHVN' => 'WSTAACGRYMKVHDBNTAACGRYMKVHDBN');
$seq = $seq.flip;
$seq = $seq.trans('wsatugcyrkmbdhvnATUGCYRKMBDHVN' => 'WSTAACGRYMKVHDBNTAACGRYMKVHDBN');

my ($i,$stop) = (0,$seq.chars/60);
loop ($i=0; $i < $stop; $i++) {
$seq = $seq.flip.trans('wsatugcyrkmbdhvnATUGCYRKMBDHVN' => 'WSTAACGRYMKVHDBNTAACGRYMKVHDBN');

for ^($seq.chars/60) -> $i {
say $seq.substr($i*60,60);
}
}

0 comments on commit dde18a0

Please sign in to comment.