in reply to Re: Loop through hash structure
in thread Loop through hash structure

Hi Nvivek,

This looks like what I need, however I would like to loop through all the indexes not just 0 or 1 is there a way to do that? Taking out the index number gives the error. Thanks!

Pseudo-hashes are deprecated at Z:/My Documents/Workspace/Script.pl line 12.
Argument "\x{51}\x{41}" isn't numeric in hash element at Z:/My Documents/Workspace/Script.pl line 12.
Bad index while coercing array into hash at Z:/My Documents/Workspace/Script.pl line 12.

Replies are listed 'Best First'.
Re^3: Loop through hash structure
by Corion (Patriarch) on Sep 07, 2010 at 13:21 UTC
      Hi Corion, had a look at those 2 documents and tried a few things but still no breakthrough. I can only seem to access the array values when I include the index as above. Is there any simple way of looping through or am I using a poor structure or something? Thanks!

        How would you do it if you had a plain hash or array?

        If you take your code to do it with a plain hash, look at References Quick Reference or perlreftut to see how to modify code that works for a plain hash so it works with a reference.