Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: sub argument passing? (TIMTOWTDI)

by Tanktalus (Canon)
on Sep 20, 2012 at 03:07 UTC ( #994579=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub say_hello
    {
    ...
    say_hello(); # says "hello, world"
    say_hello({ who => 'temporal'}); # says "hello, temporal"
    say_hello({ hello_sub => sub { my $o = shift; say "wazzup, ", $o->{zup
    +} // 'homie' }, zup => 'bro' }); # says "wazzup, bro"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-12-26 04:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (165 votes), past polls