# WTF if ( defined $r && ref $r && ref $r eq 'HASH' && keys %$r ) { ... } #### if( $r and UNIVERSAL::isa($r,'HASH') and %$r ) { ... }