madaket has asked for the wisdom of the Perl Monks concerning the following question:
I have a hash of lists (called inventory) that contain an itemcode (the key), description, price, and quantity.
When I try to find out if the quantity is greater than zero:
I always get this error message:foreach my $itemcode (keys %inventory) { my $quantity = $inventory{$itemcode}[2]; if ( $quantity > 0 )
Use of uninitialized value in numeric gt (>) at (the if statement line).
Right now, I have all of the use strict; statements commented out.
Any suggestions on how to correct this error?
Thanks.
Back to
Seekers of Perl Wisdom