develooper Front page | perl.beginners | Postings from April 2010

XML Parser Error

Thread Next
From:
Open Source
Date:
April 15, 2010 10:42
Subject:
XML Parser Error
Message ID:
20100415174205.14360@gmx.com
I'm getting this error:

Undefined subroutine &XML::Simple::XMLin called at ./sample.pl line 3.

Here's my code and input file:

use XML::Simple;
use Data::Dumper;
$data = XMLin("sample.xml");
print Dumper($data);

<?xml version='1.0'?>
<employee>
 <name>John</name>
 <age>43</age>
 <gender>M</gender>
 <department>Operations</department>
</employee>

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About