On Mon, 8 Sep 2014 09:26:44 -0400 bulk88 <bulk88@hotmail.com> wrote: > > instead of > > > > my $reftype= ref($foo); > > if (defined $reftype and $reftype eq "HASH") { > > } > > > Use no strict uninit to turn off the warning, that skips the extra > defined op. I think you mean s/strict/warnings/. Indeed; this kind of situation is one of the places where I find it useful to turn off that pesky warning; another being e.g. if( do { no warnings 'uninitialized'; $foo eq "something" } ) ... just to shut up the problem of undef. -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANSThread Previous | Thread Next