r.joseph has asked for the wisdom of the Perl Monks concerning the following question:

Given the following small XML file:

<operating_systems> <os score="10" name="Linux" /> <os score="7" name="BeOS" /> <os score="-999999999" name="Windows 9x" /> </operating_systems>

...and the following code snippet:

#!/usr/bin/perl use warnings; use XML::Simple; use Data::Dumper; my $file = './os.xml'; my $ref = XMLin($file); print $ref{'os'}->{'Linux'}->{'score'};

...with the resulting data structure in $ref looking like:

$VAR1 = { 'os' => { 'BeOS' => { 'score' => '7' }, 'Windows 9x' => { 'score' => '-999999999' }, 'Linux' => { 'score' => '10' } } };

one would expect that the score value for Linux would be printed, which should be, in this case, 10.

Then why oh why does this script instead print nothing at all?!

Oh XML::Simple, why can't you just be SIMPLE?

r. j o s e p h
"Violence is a last resort of the incompetent" - Salvor Hardin, Foundation by Issac Asimov