use strict; use warnings; use autodie; my $xml = <<'HERE'; # copy and paste here all the XML you posted # in the node above. HERE open my $fh, '>', 'new.xml'; print $fh $xml; close $fh; #done.