我正在尝试执行以下代码,但它给出了错误代码:
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";
所以它给出了行中规定的错误:
print "There are " . scalar@{$error->{problem}} . " problems.\n";
请让我知道我做错了什么。谢谢你。