Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: What I Most Recently Learned in Perl, But Should Have Already Known

by izut (Chaplain)
on Aug 18, 2006 at 20:43 UTC ( #568262=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^4: What I Most Recently Learned in Perl, But Should Have Already Known
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://568262]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-09-23 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (211 votes), past polls