Any insight as to where my folly lies would be appreciated.
You're trying to treat $ref->{wrapper}->{$wrapName}->{envVar} as a hashref in the first case and an arrayref in the second - it can't be both. If you need it to be both then you need XML::Smart :-)
The reason it is a hashref is because you're not setting the KeyAttr option so its default value is causing the array of envVar element to be transformed into a hash keyed on the value of the 'name' parameter. If you don't want that, set KeyAttr => { }.
Oh and the option names are case-insensitive as long you have the latest version of XML::Simple.
In reply to Re: How do I correctly use arrays with XML::Simple?
by grantm
in thread How do I correctly use arrays with XML::Simple?
by ccarden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |