in reply to Re^3: How to populate a HASH using a FOR loop to a FUNCTION
in thread How to populate a HASH using a FOR loop to a FUNCTION

My first rewrite of your code kept all the printing that you had in the OP, but was still down to 22 lines versus 45 for yours.

Dumper is a function of the Data::Dumper module that enables to pretty print in just one command the content of hashes, arrays or more complicated data structures. Very convenient for debugging nested data structures.