%h=qw/a 1 b 0 c 2/; while (($k,$v)=each %h) { $x=$v or warn("got a false value for key $k"),next; # $x=$v or warn "got a false value for key $k", next; print "got a true value for key $k: $v\n"; }