#!/usr/bin/perl use strict; use warnings; use XML::Twig; print ""; foreach my $file ( ' to_concat_1.xml', 'to_concat_2.xml') { print XML::Twig->new( keep_spaces =>1, comments => 'process')->parsefile( $file)->root->xml_string; } print "\n";