in reply to Re^2: disadvantages of perlin thread disadvantages of perl
if( UNIVERSAL::isa($r,'HASH') and %$r ) { ... } [download]
... except that even that abusive code can't accurately determine if you can dereference all hashlike $r as a hash.