Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: hash problem

by robartes (Priest)
on Jun 08, 2005 at 08:56 UTC ( #464597=note: print w/ replies, xml ) Need Help??


in reply to hash problem

I don't know whether this is part of a larger script, but $refnum never gets set in this snippet, so you are storing your data in a hash entry with an empty key. That's why the entry with key '1' is undefinded undefined, triggering your die.

Perhaps in the while loop you meant:

$names{$ref}=$str;

Update: stop inventing new verbs

CU
Robartes-


Comment on Re: hash problem
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (17)
As of 2014-11-26 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (171 votes), past polls