Help for this page
open (my $fh_out, '>', $out_file) or die "unable to open '$out_file' f +or writing: $!"; ... ... # do what you have to do to $elt $elt->print( $fh); # this is where you have to print it }