http://qs321.pair.com?node_id=13836


in reply to Flipper

for the simple on/off case, you can also use XOR:
my @Toggles = qw(on off); $Toggles[$flip^=1];

Replies are listed 'Best First'.
RE(2): Flipper
by Russ (Deacon) on May 20, 2000 at 06:58 UTC
    Ooooooh. Very nice! Hadn't seen that.