Perl スクリプトを実行して、xml ドキュメントのすべての要素を配列に取得しようとしています。コードは次のとおりです。
#!/usr/bin/perl
# Script to illustrate how to parse a simple XML file
# and dump its contents in a Perl hash record.
use strict;
use XML::Simple;
my $xs = new XML::Simple();
my $booklist = $xs->XMLin('./cmn_msg.xml');
print Dumper($data);
このコードを実行すると、エラーが発生します。
Use of tied on a handle without * is deprecated at C:/Perl/lib/XML/Parser/Expat.pm line 447.
not well-formed (invalid token) at line 4, column 14, byte 128 at C:/Perl/lib/XML/Parser.pm line 187
MSWin32-x86-multi-thread 用にビルドされた ActivePerl (v5.14.1) を使用しています。このスクリプトを Win7 で実行しようとしています。