Not that this is any more correct than any other suggestion, but in the past I've used something like:
my @stuff = ( "a", "b", "c", "d" ); { my @current_list; sub cycle { @current_list = @stuff unless @current_list; return pop ( @current_list ); } }
In reply to Re: Is there a "better" way to cycle an array?
by Preceptor
in thread Is there a "better" way to cycle an array?
by rje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |