in reply to Re^2: calling a hash
in thread calling a hash
See in particular the last line. But then if had also turned on strict$ perl -we '%a=($bob => "foo")' Name "main::a" used only once: possible typo at -e line 1. Name "main::bob" used only once: possible typo at -e line 1. Use of uninitialized value in list assignment at -e line 1.
So, to put it briefly: do it!$ perl -Mstrict -e 'my %a=($bob => "foo")' Global symbol "$bob" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
|
|---|