Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: assign multiple values of a key in hash to multiple variable

by davido (Cardinal)
on Aug 21, 2013 at 05:26 UTC ( [id://1050282]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash;
    $hash{some_key}  = [ $this, $that ]; # [ ... ] creates an anonymous ar
    +ray ref.
    ...
    foreach my $key ( keys %hash ) {
      print "key: $key, values: $hash{$key}[0], $hash{$key}[1]\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found