Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 drinking their drinks and smoking their pipes about the Monastery: (16)
As of 2014-07-10 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (210 votes), past polls