in reply to A few random questions from Learning Perl 3
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; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: A few random questions from Learning Perl 3
by talexb (Chancellor) on Jan 06, 2003 at 14:39 UTC |