I have the following data structure (received from 3rd party web site so I cannot change format) and am trying to find a way to output status and direction for each question (questions) using a loop. I can access them individually. Hopefully a simple query.

Perl's own documentation should be a big help. For help in using the document reader, at your command line, type:

Code

perldoc perldoc

Study the document perldsc (and all the documents referenced in its 'SEE ALSO' section).

Note that my code is a minor generalization of the first example in the documentation for the function 'each' (refer to the document perlfunc).

It would be helpful to others if you would edit your original post. Add the missing line and a comment indicating that it is a correction. Verify that you can download and compile the corrected code. Good Luck, Bill