Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: use of unitialized value

by robartes (Priest)
on Oct 20, 2003 at 18:10 UTC ( #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-


Comment on Re: use of unitialized value
Select or Download Code
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
Node Status?
node history
Node Type: note [id://300691]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2015-07-05 14:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls