Welcome to the Monastery | |
PerlMonks |
RE: RE: RE: Re: Possible pitfall with Slicesby Fastolfe (Vicar) |
on Nov 07, 2000 at 01:36 UTC ( [id://40250]=note: print w/replies, xml ) | Need Help?? |
The code I posted was relevant only to the example you gave. Sorry if that wasn't clear. I did not intend to suggest that exists is the best thing to use in all circumstances. If the values of your hash are important, by all means inspect them. If you're just filling a hash to keep track of the presence of certain items (keys), however, it's a little cleaner to simply see if that key exists in the hash, not to try and test for a true value at $hash{$key}.
In Section
Seekers of Perl Wisdom
|
|