larthana has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I am using unix platform to develop simple perl xml program. SunOS 5.9 is the unix version. Also i have installed perl 5.6.1. but i couldnt find the XML package in /usr/perl5/5.6.1/lib. Is this version support XML programming in perl?.
Below is the simple XML program.
use XML::Simple; use Data::Dumper; # create array @arr = [ {'country'=>'england', 'capital'=>'london'}, {'country'=>'norway', 'capital'=>'oslo'}, {'country'=>'india', 'capital'=>'new delhi'} ]; # create object $xml = new XML::Simple (NoAttr=>1, RootName=>'data'); # access XML data print Dumper($data);
Ouput:
Can't locate XML/Simple.pm
Can anyone of you help me what am doing wrong?
20070116 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: xml support version
by shigetsu (Hermit) on Jan 16, 2007 at 07:16 UTC | |
|
Re: xml support version
by marto (Cardinal) on Jan 16, 2007 at 11:29 UTC | |
|
Re: xml support version
by davorg (Chancellor) on Jan 16, 2007 at 09:10 UTC |