Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: use of unitialized value

by robartes (Priest)
on Oct 20, 2003 at 18:10 UTC ( [id://300691]=note: print w/replies, xml ) Need Help??


in reply to use of unitialized value

Try dumping the contents of $inventory{$itemcode} to see what's actually in it (using Data::Dumper:
print Dumper($inventory{$itemcode}); # or even: print Dumper(\%inventory);
That way, you can verify that the hash values contain what you think they contain.

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: use of unitialized value
by madaket (Novice) on Oct 20, 2003 at 18:53 UTC

    Hmmmm...
    The funny thing about this error message is that it happens whether there is a value in

    $inventory{$itemcode}[2]
    or not. The loop will generate the error in each iteration.
    The value is from a web page form input, so I thought the problem might be a string/number conversion, but the error message doesn't indicate that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-24 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found