my $counter = 0;
while ($counter < $limit) {
my $item = shift @work_queue;
my $thingy = some_function($item);
if ($thingy ne 'PARTY') {
++$counter;
next;
}
# more code if $thingy ne 'PARTY'
++$counter; # thanks ikegami
}
####
my $counter = 0;
while ($counter < $limit) {
my $item = shift @work_queue;
my $thingy = some_function($item);
next if $thingy ne 'PARTY';
# more code if $thingy ne 'PARTY'
}
continue { ++$counter; }
####
if ($condition1) {
# statement 1
# statement 2
# statement 3
next;
}
# more code
if ($condition2) {
# statement 1
# statement 2
# statement 3
next;
}
####
next if $condition1;
# more code
next if $condition2;