use strict; undef $/; my $path = $ARGV[0]; my $out = $ARGV[1]; opendir(DIR, $path) || die "cannot read folder path"; my @xmlfiles = grep {/\.xml$/i} readdir(DIR); closedir(DIR); foreach my $xml(@xmlfiles) { open(FIN, "$path/$xml") or die("Couldn't open input File!!"); my $file = ;