targetsmart has asked for the wisdom of the Perl Monks concerning the following question:
here is one code
Vivek
-- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.
other codeperl -e "%package = ( 'zips' => {1,2,3,4} ); print %package->{zips};"
both the one liners printperl -e "%package = ( 'zips' => {1,2,3,4} ); print $package{zips};"
but when I enable warning(-w) the former producesHASH(0x23bbe4)
Using a hash as a reference is deprecated at -e line 1.
I thought only the later should work, the former should fail, but it is also working but outputs along with a warning. can anyone tell me what happens if I do like %package->{key} considering the above example.
Vivek
-- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.
Back to
Seekers of Perl Wisdom