toliyn has asked for the wisdom of the Perl Monks concerning the following question:
I wrote file.pl<?xml version="1.0" encoding="utf-8" ?> <SDForm> <Form name="cmdb_cohesion.html" lang="en_US"> <ResourceString> <tag>en</tag> <value>en</value> </ResourceString> <ResourceString> <tag>Cohesion</tag> <value>Cohesion</value> </ResourceString> </Form> </SDForm>
and as a result of running this script i get such error "Not a HASH reference at: ...file.pl line 14. Please tell me why? What i need to do to fix this. thanksuse XML::Simple; use strict; my $xml = new XML::Simple; my $data = $xml->XMLin('cmdb_coh.xml'); print $data->{Form}->{ResourceString}->{value};
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Not a hash reference... why?
by Corion (Patriarch) on Apr 26, 2010 at 11:08 UTC | |
by toliyn (Novice) on Apr 26, 2010 at 11:19 UTC | |
Re: Not a hash reference... why?
by derby (Abbot) on Apr 26, 2010 at 11:13 UTC | |
Re: Not a hash reference... why?
by toliyn (Novice) on Apr 26, 2010 at 11:13 UTC | |
Re: Not a hash reference... why?
by BrowserUk (Patriarch) on Apr 26, 2010 at 11:11 UTC | |
Re: Not a hash reference... why?
by arc_of_descent (Hermit) on Apr 26, 2010 at 20:39 UTC | |
Re: Not a hash reference... why?
by Anonymous Monk on Apr 26, 2010 at 13:22 UTC |