if (!@ARGV) { print "\t Usage: perl $0 \n\n"; exit(0); } open (F1, "<$ARGV[0]") || die ("Can't open the file $ARGV[0]. $!\n"); $out = $ARGV[0]; $out =~ s/(.+)\.(.+)/$1/; $out = $out.".xml"; open (F2, ">$out") || die ("Can't open the file $out. $!\n"); while() { $no++; $_ =~ s//''/egs; print F2 $_; } close F1; close F2;