Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: More efficient ways to pass values to a sub routine

by toolic (Bishop)
on Jan 31, 2017 at 19:47 UTC ( [id://1180718]=note: print w/replies, xml ) Need Help??


in reply to More efficient ways to pass values to a sub routine

You pass a reference to a hash to send_2. This ref is placed into the 1st element of @_ inside the sub. Here is one way to access the hash keys:
sub send_2 { my $args = shift; my $name = $args->{name} || ''; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found