In my never ending search for more elegant looking and self-documenting code I decided to try out the Switch module.
I've sometimes faked a switch statement like this...
SWITCH: { $foo eq 'r' && do { # read stuff last SWITCH; }; $foo eq 'w' && do { # write stuff last SWITCH; }; DEFAULT: { # default stuff } }
Hopefully more portable than the Switch module? I admit it's less elegant though :-/
Mark