http://www.perlmonks.org?node_id=1112723

pcouderc has asked for the wisdom of the Perl Monks concerning the following question:

When I use :
#!/usr/bin/perl # use strict; use XML::Twig; #my $twig=XML::Twig->new(pretty_print => 'indented', keep_encoding => +1); my $twig=XML::Twig->new(pretty_print => 'indented'); $twig->parse( '<?xml version="1.0" encoding="UTF-8"?><myxml/>'); my $root= $twig->root; $root->set_att( 'fille' => 'clémence'); open(PF, "> out.xml") or die "can't open file $!\n"; $twig->print(\*PF);
I get :
cat out.xml <?xml version="1.0" encoding="UTF-8"?> <myxml fille="clémence"/
So my question : who has corrupted Clémence ? What have the done her? I know that this subject has soon occured here but without a clear answer.