defined(%hash) is deprecated at Z:\Data\Perl\PkgName.pl line 39 (#1) (D deprecated) defined() is not usually useful on hashes because it checks for an undefined scalar value. If you want to see if the hash is empty, just use if (%hash) { # not empty } for example. (Maybe you should just omit the defined()?)