in reply to How to compare an empty key with another empty key in associative array

That sounds like you're coming from PHP. Well, OK, I'll write a little utility function empty which should look a bit familiar. That way you can compare if 2 values are both empty.
sub empty { my $r = shift; if(!ref $r) { return !$r } if(ref $r eq 'HASH') { return !keys %$r } if(ref $r eq 'ARRAY') { return !@$r } if(ref $r eq 'SCALAR') { return !$$r } return !1; } $a = ''; $b = {}; $c = []; if(empty($a) && empty($b) && empty($c)) { print "PASS"; }