use strict; my( $hashref ); if( something which isn't true ) { $hashref = &getMeABabyBackHash(); } print "hashref is a " . ref( $hashref ) . ".\n";
hashref is a HASH.
Really? How odd, given that hashref was never defined.
It is unfortunately not simple enough to provide a 6-line script which demonstrates this. It has something to do with the routine being inside a package, or the fact that the conditional isn't known until a file is read in and evaluated. I'm trying to figure out what the limitation is. But it's very odd, given that the code expects the undefined hash to have an address of 0.