#!perl use strict; use warnings; use Encode; use LWP::Simple; use XML::Twig; my $url = 'http://www.paginebianche.it/ricerca?qs='.($ARGV[0] or 'Discepoli'); my $t = XML::Twig->new(); #keep_encoding=>1 my $html = get ($url); #$html = encode('UTF-8', $html); # whit the line above i get: # not well-formed (invalid token) at line 3, column 549, byte 763 at C:/perl/vendor/lib/XML/Parser.pm line 187 # without it i got: # Cannot decode string with wide characters at C:/ulisse/strawberry/perl/lib/Encode.pm line 196. $t->parse_html ($html);