in reply to while(){}continue{}; Useful?
$ perl -MO=Deparse -pe'f()' LINE: while (defined($_ = <ARGV>)) { f(); } continue { die "-p destination: $!\n" unless print $_; } -e syntax OK
It's just a question of pref, I think. It's also has a parallel with for(;;). Scoping aside,
is basically the same asfor (A; B; C) { D; }
I've never used continue.A; while (B) { D; } continue { C; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: while(){}continue{}; Useful?
by DStaal (Chaplain) on Mar 03, 2010 at 22:01 UTC |