http://qs1969.pair.com?node_id=219711


in reply to Case structures using a hash

++!
But what about an else/default case? I'd put something like this:

&{ ($PSUEDO_SWITCH{$match}||$PSUEDO_SWITCH{'ELSE'}) }('arg1', 'arg2', 'arg3');

-BronzeWing


Perl Monks do it more than one way.