perl -pi.bak 's/,//' file.out and $line =~ tr/,//d; #### #!c:perl\bin\perl.exe perl -pi.bak 's/,//' testdata.txt #$line =~ tr/,//d;