Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
RE: Flipperby gregorovius (Friar) |
on May 21, 2000 at 05:18 UTC ( [id://13957]=note: print w/replies, xml ) | Need Help?? |
You can use Tie::FlipFlop for the same purpose. Here's the
synopsis from the perldoc document:
It's probably too much for such a simple function but frees you from keeping the $flip variable around. You can use Tie::Counter in the same fashion to rotate through more than two elements.
In Section
Cool Uses for Perl
|
|