in reply to Re^2: 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

Dear Bill,
you are right: all the text I have used herein was just for debugging. The actual function I would like to create would just populate a given hash when called in different points within the main scripts. And at the moment I have no idea what Dumper is...
G
  • Comment on Re^3: How to populate a HASH using a FOR loop to a FUNCTION

Replies are listed 'Best First'.
Re^4: How to populate a HASH using a FOR loop to a FUNCTION
by Laurent_R (Canon) on Dec 27, 2014 at 17:59 UTC
    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.