I believe this message is cause by the warning's pragma (
-w), to alert you to the printing of an undefined value, not the returning of one. To test this thoery, i used the following :
#!/usr/bin/perl -wl
use strict;
my $hashref = { foo => { bar => 'xyzzy' } };
sub name_me {
# Note: there is no $hashref->{foo}{foo}
return \ $hashref->{foo}{foo};
}
$a = name_me();
print $a;
print $$a;
print ${ name_me() }
This, on my machine, prints the following :
SCALAR(0x184068)
Use of uninitialized value in print at bar.pl line 15.
Use of uninitialized value in print at bar.pl line 17.
$ perl -e 'do() || ! do() ;'
Undefined subroutine &main::try