Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 surveying the Monastery: (6)
As of 2014-07-13 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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








    Results (247 votes), past polls