# Or more maintainable! %options=( a => sub { do_this() or that() }, b => \&do_that, c => sub { do_nut() }, ); foreach(split(//, &fetch_input)) { &{$options{$_}} if exists $options{$_}; }
In reply to Re: Re: optimized switch case
by clintp
in thread optimized switch case
by screamingeagle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |