The weird thing is, that if i put the hashref in the dereference, or if i have a single-layered $hashref, it doesn't show the warning. Why is perl showing a warning with the above script?#!/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}; } print ${ name_me() }; # Note: I narrowed it down to this code. The original code # was about 50 lines. Because this is just a fragment, I couldn't # think of a proper name for the sub. Sorry :)
In reply to Autovivification not working? by Juerd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |