in reply to Re^3: What I Most Recently Learned in Perl, But Should Have Already Known
in thread What I Most Recently Learned in Perl, But Should Have Already Known
I think this way is prettier.
sub do_something { my ($function) = @_; $function = 'default' unless exists $functions{$function}; $functions{$function}->(); }
Igor 'izut' Sutton
your code, your rules.
|
---|
In Section
Meditations