Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Multiple values per key in a hash

by TOD (Friar)
on May 13, 2008 at 10:09 UTC ( [id://686231]=note: print w/replies, xml ) Need Help??


in reply to Multiple values per key in a hash

$uniq{$file} = { 'suffix1' => $foo, 'suffix2' => $bar };
in principle you cannot assign multiple values to one key in a hashtable, because its a key -> value construct. but if the value is a reference, i.e. to a hashref, you can bypass this restriction. note that all values must be scalars or references, not arrays or hashtables.
--------------------------------
masses are the opiate for religion.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found