appleii has asked for the wisdom of the Perl Monks concerning the following question:
But this code will be OK:do { last; } while (1);
What's the differentiation between them? And I wonder why the 'do for loop' can work.do { next if (not defined $_); print $_, "\n"; next; } for (1 .. 10);
Update:
It's a bug or a speciality?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: do while loop isn't a really loop?
by keszler (Priest) on Nov 12, 2009 at 03:03 UTC | |
|
Re: do while loop isn't a really loop?
by ikegami (Patriarch) on Nov 12, 2009 at 03:03 UTC | |
by appleii (Novice) on Nov 12, 2009 at 03:44 UTC | |
by ikegami (Patriarch) on Nov 12, 2009 at 04:49 UTC |