Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 browsing the Monastery: (9)
As of 2014-11-22 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (120 votes), past polls