I am having trouble understanding a part of program that I am trying to tweak that I got off the web for sequence alignment.
I haven't changed anything but keep getting errors for
while (scalar(@ra) while (scalar(@rb) while (scalar(@rc) # print out the answer
It is in the context of
if (!$d->[$x][$y][0] && !$d->[$x][$y][1] && !$d->[$x][$y][2]) { for (my $u=$x; $u>0; $u--) { unshift @ra, $sa[$u-1]; } for (my $v=$y; $v>0; $v--) { unshift @rb, $sb[$v-1]; } while (scalar(@ra) while (scalar(@rb) while (scalar(@rc) # print out the ans +wer $i++; # global variable $scr = 0; # score for each alignment print "<br>Alignment: $i<br>Sa:"; foreach my $x (@ra) { print " $x"; } + print "<br>Sb:"; foreach my $y (@rb) { print " $y"; } + print "<br>Scr"; foreach my $z (@rc) { if ($z eq '.') { print " ."; } else { printf '%4d', $z; $scr += $z; } } print " = $scr<br>"; }
What does it mean? And why do I keep getting errors? #I know that scalar() is to force scalar context.#
Thanks Monks, chris
In reply to while (scalar() by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |