Here's what it looks like:foreach (1..10) { next if ($_ == 9); print("$_ "); }
And here's the output:foreach (1..10) { last if ($_ == 9); print("$_ "); }
In this case, here's what you'll see:foreach (1..10) { print("$_ "); if ($_ == 9 && $flag != 1) { $flag=1; redo; } }
In reply to Re: A few random questions from Learning Perl 3
by pg
in thread A few random questions from Learning Perl 3
by sulfericacid
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |