use Tie::Cycle; # in the CPAN tie my $cycle, 'Tie::Cycle', [ qw( FFFFFF 000000 FFFF00 ) ]; print $cycle; # FFFFFF print $cycle; # 000000 print $cycle; # FFFF00 print $cycle; # FFFFFF back to the beginning (tied $cycle)->reset; # back to the beginning
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Toggling between two values
by merlyn
in thread Toggling between two values
by pernod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |