Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Hash with one key, three values

by biosysadmin (Deacon)
on Nov 14, 2004 at 23:13 UTC ( [id://407732]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $hash = {
        'key' => ['one', 'two', 'three']
    }
    
  2. or download this
    
    while ( my ($key,$string) = each %oldhash ) {
    ...
    print $newhash{$key}->[0], "\n"; 
    # print out all of the elements for a given key
    print "$key: ", join @{$newhash{$key}}, '-', "\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-04-23 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found