because you're throwing away the result of the ++. Either change it tofor (1..12){ print "$Cheers[$flip = ++$flip % 4]\n"; }
or the slightly cooler$flip = ($flip + 1) % 4;
($flip += 1) %= 4;
-- Randal L. Schwartz, Perl hacker
In reply to RE: Flipper
by merlyn
in thread Flipper
by Russ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |