Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Send hash of hash arguments to sub (Dumper reference my %hash = @_ )

by Happy-the-monk (Abbot)
on Aug 14, 2013 at 08:27 UTC ( #1049400=note: print w/ replies, xml ) Need Help??


in reply to Re: Send hash of hash arguments to sub (Dumper reference my %hash = @_ )
in thread Send hash of hash arguments to sub

my( %hashgetsthemall, $two, $eleven ) = 1 .. 11;

my( $one, $two, %hashgetstherest ) = 1 .. 12;

is one way to do it if you wanted copies of the values anyway.
The list variable must come last though, and there can be only one.

    update:

    In the OP's example that is:

    my ($source, $target, %hash) = @_;

    Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)


Comment on Re^2: Send hash of hash arguments to sub (Dumper reference my %hash = @_ )
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2015-07-04 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls