in reply to Re: I need a different continue
in thread I need a different continue

I like this, but you're running all the todos each time through the loop. That is, on iteration N, you'll run N-1 todos. You need to do more like
{ my $todo; foreach my $elt (0..2 ) { $todo->() if $todo; $todo = sub { print "$elt\n" }; } }

Caution: Contents may have been coded under pressure.