in reply to while(){}continue{}; Useful?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: while(){}continue{}; Useful?
by BrowserUk (Patriarch) on Mar 03, 2010 at 17:37 UTC | |
by kennethk (Abbot) on Mar 03, 2010 at 18:07 UTC | |
by BrowserUk (Patriarch) on Mar 03, 2010 at 20:38 UTC | |
by kennethk (Abbot) on Apr 05, 2010 at 17:09 UTC | |
by BrowserUk (Patriarch) on Apr 05, 2010 at 19:23 UTC | |
| |
|
Re^2: while(){}continue{}; Useful?
by AnomalousMonk (Archbishop) on Mar 03, 2010 at 19:10 UTC |