in reply to Test Presence of Data in Hash
You'll never want to used defined on hashes and arrays. It reports on an unimportant internal property of those variables (whether or not some memory is allocated for data). This usage is even deprecated. Why aren't you using warnings?
$ perl -wle'my %a; print defined(%a)?1:0' defined(%hash) is deprecated at -e line 1. (Maybe you should just omit the defined()?) 0
|
|---|