% perl -MScalar::Util=reftype -we '$x=1; my $y=($x and reftype $x eq q(HASH))' Use of uninitialized value in string eq at -e line 1. #### ...( reftype $x and reftype $x eq 'HASH' )... #### { my $temporary_variable = reftype $x; ...( $temporary_variable and $temporary_variable eq 'HASH' )... }