use warnings; use strict; my $empty_str = q{}; my $empty_hash_ref = { q{} => q{}, }; for ( keys %$empty_hash_ref ) { $empty_str eq $_ ? print "PASS" : print "FAIL"; ## print PASS } ## use smartmarch ~~ $empty_str ~~ $empty_hash_ref ? print "PASS" : print "FAIL"; ## print PASS