in reply to Switch.pm or possible alternatives
use Switch::Perlish; switch $your_var, sub { case 'this', \&this_function; case 'that', \&that_function; case 'the', \&the_function; case 'other', \&other_function; default sub { print "Nothing matched '$your_var'\n" }; };
_________
broquaint
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Switch.pm or possible alternatives
by BrowserUk (Pope) on May 21, 2005 at 15:39 UTC | |
Re^2: Switch.pm or possible alternatives
by smack (Beadle) on May 25, 2005 at 11:18 UTC |