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


in reply to Have you worked to get it?
in thread Populating a Hash: Can someone help me to understand?

Absolutely! Spent about 2 hours or so, trying different permutations, throwing in print statements along the way, to see where things fail.

Replies are listed 'Best First'.
RE (tilly) 2: Have you worked to get it?
by tilly (Archbishop) on Sep 20, 2000 at 15:40 UTC
    I think you are treating this as unknown code to try and figure out, rather than as an unknown concept to master. Instead of trying random tinkering and syntax from working code, try a series of exercises. Such as this:
    1. Read Data::Dumper's documentation.
    2. Pass Data::Dumper a reference to an array and see what it gives you.
    3. Take a reference to an array and try to get a specific element from that.
    4. Loop through the elements of an array which you have a reference to.
    5. Repeat with hashes.
    6. Repeat with various combinations of nested arrays and hashes.
    7. Then try to see if you understand and could explain to someone else who understood references the code which puzzled you.
    Please try that.