in reply to Testing for hash key value
Update: djantzen kindly pointed out what I overlooked - that you also have to remove the 'keys' command or perl will still throw an error. However this leads to a rather nice way to check for what you want:
if ((eval"%{$hash{'one'}}")) { print "It's a hash\n"; } else { print "It's not a hash\n"; }
So it turns out there's more than one way to do it :)
____________________
Jeremy
I didn't believe in evil until I dated it.
|
|---|