Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys, hope you can help on this one. I have a hash which is filled from lines in a file, after a split of the line a hash is filled defined as $time{$recordNumber}. Later on in the script I want to check if $time{$recordNumber} exists, and if not enter the if statement. I tried using
but got Use of uninitialized value at ././monitor-dataset-age line 147 It's not no, because it's not there...but I'm testing to see if it's not there!? Any help much appreciated, Many thanks, Kimif ($time{$recordNumber} == undef) #147 { $time{$recordNumber} = 10000; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: hash undef?
by moritz (Cardinal) on Nov 15, 2007 at 12:59 UTC | |
by Anonymous Monk on Nov 15, 2007 at 15:16 UTC | |
| |
Re: hash undef?
by zer (Deacon) on Nov 15, 2007 at 14:23 UTC | |
by Anonymous Monk on Nov 15, 2007 at 15:11 UTC | |
Re: hash undef?
by dsheroh (Monsignor) on Nov 15, 2007 at 19:12 UTC |
Back to
Seekers of Perl Wisdom