Perl-Sensitive Sunglasses | |
PerlMonks |
How do I correctly use arrays with XML::Simple?by ccarden (Monk) |
on Oct 08, 2003 at 15:29 UTC ( [id://297630]=perlquestion: print w/replies, xml ) | Need Help?? |
ccarden has asked for the wisdom of the Perl Monks concerning the following question:
For my test, I have a simple XML structure:
The following code successfully parses the xml file: ... and correctly produces the following output ... Now, if I try to treat the <envVar> tags as an array, I run into trouble: ... produces a blank line. I assumed that this was because I needed to turn forceArray on, so I changed the call to XMLin(): ... but still I get the same blank line as output. I suspect that I'm either using forceArray incorrectly or I'm using an invalid array reference. Any insight as to where my folly lies would be appreciated.
UpdateThanks for all of the input. What have I learned? I have learned that I need to:
Back to
Seekers of Perl Wisdom
|
|