You need a loop structure to loop, although redo can be teased to do some odd things.sub NEXTKEY { my ($self, $lastkey) = @_; # $lastkey isn't used? while (my $key = $KEYS[$self->{INDEX}++]) { if ($key ne $self->{FIRSTKEY}) { return $key; } } }
In reply to Re: Can't "next" outside a loop block
by tadman
in thread Can't "next" outside a loop block
by hbradshaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |