r.joseph has asked for the wisdom of the Perl Monks concerning the following question:
<operating_systems> <os score="10" name="Linux" /> <os score="7" name="BeOS" /> <os score="-999999999" name="Windows 9x" /> </operating_systems>
#!/usr/bin/perl use warnings; use XML::Simple; use Data::Dumper; my $file = './os.xml'; my $ref = XMLin($file); print $ref{'os'}->{'Linux'}->{'score'};
$VAR1 = { 'os' => { 'BeOS' => { 'score' => '7' }, 'Windows 9x' => { 'score' => '-999999999' }, 'Linux' => { 'score' => '10' } } };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Simple isn't simple!
by VSarkiss (Monsignor) on Aug 17, 2001 at 05:36 UTC | |
by r.joseph (Hermit) on Aug 17, 2001 at 05:40 UTC | |
by VSarkiss (Monsignor) on Aug 17, 2001 at 05:55 UTC | |
by r.joseph (Hermit) on Aug 17, 2001 at 06:10 UTC | |
|
Re: XML::Simple isn't simple!
by ozone (Friar) on Aug 17, 2001 at 16:11 UTC |