In perl, to break out of a foreach loop we need to use

the keyword "last" and not "break".  Fixing the failing
test case.
This commit is contained in:
Annamalai Gurusami 2012-05-04 12:29:49 +05:30
parent 95205bbaff
commit b757c13078

View file

@ -33,7 +33,7 @@ foreach $line (reverse @lines) {
++$count;
print "$line";
if ($count == 2) {
break;
last;
}
}
}