use strict; my $hash = { Foo => 1 }; if( $hash->{Foo}->{EEEEEEEK} cmp "abcdefghijklmnopqrstuvwxyz" ){ } __END__ Can't use string ("1") as a HASH ref while "strict refs" in use at ....