I am trying to execute the following code, but it gives the error code :
use XML::Simple;
use Data::Dumper;
$xml = new XML::Simple (KeyAttr=>[]);# read XML file
$error =$xml->XMLin("trial.xml");
print "There are " . scalar@{$error->{problem}} . " problems.\n";
so it gives error prescribed at line :
print "There are " . scalar@{$error->{problem}} . " problems.\n";
Please let me know what I am doing wrong. thank you.
print Dumper($error);after$error =$xml->XMLin("trial.xml");, seems, that the XML file is not read properly.