my $empty_str = q{}; my $empty_hash_ref = {}; ## why? for (keys %$empty_hash_ref){ $empty_str eq $_? print "PASS": print "FAIL"; # print nothing } $empty_str~~$empty_hash_ref?print "PASS": print "FAIL"; # print FAIL