http://qs321.pair.com?node_id=781575

targetsmart has asked for the wisdom of the Perl Monks concerning the following question:

here is one code
perl -e "%package = ( 'zips' => {1,2,3,4} ); print %package->{zips};"
other code
perl -e "%package = ( 'zips' => {1,2,3,4} ); print $package{zips};"
both the one liners print

HASH(0x23bbe4)
but when I enable warning(-w) the former produces

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.