in reply to How do I correctly use arrays with XML::Simple?
Looking at this in the debugger it seems that XMLin() may not be giving you what you expected:
c:\>perl -d test.pl Loading DB routines from perl5db.pl version 1.19 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(test.pl:6): my $ref = XMLin(<<XML main::(test.pl:7): <config> main::(test.pl:8): <wrapper name="testName 1.0.3" script="/us +r/people/ltorvalds/apps/wrapper.pl" app="testApp.exe"> main::(test.pl:9): <envVar name="TMPDIR" value="/usr/tmp" +/> main::(test.pl:10): <envVar name="APPDIR" value="/usr/bin" +/> main::(test.pl:11): </wrapper> main::(test.pl:12): </config> main::(test.pl:13): XML main::(test.pl:14): ); DB<1> n main::(test.pl:15): my $wrapName = "testName 1.0.3"; DB<1> x $ref 0 HASH(0x1cb36d0) 'wrapper' => HASH(0x1cc3a10) 'app' => 'testApp.exe' 'envVar' => HASH(0x1cf4b20) 'APPDIR' => HASH(0x1cf4be0) 'value' => '/usr/bin' 'TMPDIR' => HASH(0x1ce6d34) 'value' => '/usr/tmp' 'name' => 'testName 1.0.3' 'script' => '/usr/people/ltorvalds/apps/wrapper.pl' DB<2>
No arrays there, just hashes.
|
|---|