Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Adding multiple items to a hash

by markov (Scribe)
on Mar 03, 2004 at 00:17 UTC ( [id://333415]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while(my($k,$v) = each %y)
    {  $h{$k} = $v;
    }
    
  2. or download this
    my @pairs = %y;
    while(@pairs)
    ...
        my $v = shift @pairs;
        $h{$k} = $v;
    }
    
  3. or download this
      @h{ keys %y } = values %y;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found