Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: noob with hash/data file question

by moritz (Cardinal)
on Sep 02, 2008 at 08:19 UTC ( [id://708414]=note: print w/replies, xml ) Need Help??


in reply to noob with hash/data file question

%stuff = ( '$short' => '$place', );

You're constructing a new hash (with the strings $short and $place, not with the values of these variables) and override the existing hash with it.

Instead you have to populate the hash like this: $stuff{$short} = $place

Replies are listed 'Best First'.
Re^2: noob with hash/data file question
by bhall (Initiate) on Sep 02, 2008 at 08:43 UTC
    Thanks.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2025-11-12 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.