in reply to Re: use of 'continue' block for while/until
in thread use of 'continue' block for while/until
Here is the same code with the continue block
No. Those two snippets are different. The first only does ++$counter when $thingy ne 'PARTY'. The second does ++$counter unconditionally.
my $limit = 3; my @work_queue = qw( a PARTY b c d); sub some_function { $_[0] } ... print(scalar(@work_queue), "\n");
Prints 1 for the first snippet and 2 for the second.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: use of 'continue' block for while/until
by Limbic~Region (Chancellor) on Jun 11, 2008 at 15:28 UTC |