I noticed you used the curley brackets instead of the regular brackets in the hash assignment, but that's okay ;)
I guess doing the following should be more readable, no?
This way we avoid most of the ugly punctuation marks.foreach ( @do_something ) { defined $subhash{$_} and $subhash{$_}->() } # OR foreach ( @do_something ) { $subhash{$_}->() if defined $subhash{$_} }
Aziz
In reply to Re: Re: switch statement for subroutines?
by abstracts
in thread switch statement for subroutines?
by zupereva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |