$ perl -v This is perl 5, version 12, subversion 0 (v5.12.0) built for i686-linux [snip] $ perl -Mstrict -wle'my $pkg="Foo::"; print(defined(%$pkg)?1:0)' defined(%hash) is deprecated at -e line 1. (Maybe you should just omit the defined()?) Can't use string ("Foo::") as a HASH ref while "strict refs" in use at -e line 1.