my $n = 10; while( $n ){ print $n--; next if $n%2; } continue{ sleep 1; }
vs.
my $n = 10; while( $n ){ print $n--; next if $n%2; sleep 1; }
I've never had to use flow control like this, but I can see that it could be theoretically useful.
In reply to Re: while(){}continue{}; Useful?
by kennethk
in thread while(){}continue{}; Useful?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |