D:\dev>perl -e"do { next };"
Can't "next" outside a loop block at -e line 1.
D:\dev>perl -e"{ next };"
####
BEGIN {
my $count=0; # static
sub counter {$count++}
}
for (0..9) {
print counter();
}
####
sub make_counter {
my $start=shift||0;
return sub {$start++};
}