http://www.perlmonks.org?node_id=553698


in reply to Need help from the esteemed monks on scoping/hashes

The statement %mapping = split; ensures that the hash is re-initialized with only one key; yet, the for() loop wants to print the value of more than one key as it loops through print $mapping{$n} .
  • Comment on Re: Need help from the esteemed monks on scoping/hashes