in reply to Removing Carriage returns from text files
Note: This is untested! :)open( FILE, "$file" ) || die "Unable to open $file: $!\n"; undef( $/ ); $contents = <FILE>; close( FILE ); $contents =~ s/\cM//gis; open( FILE, ">$file" ) || die "Unable to write to $file: $!\n"; print FILE $contents; close( FILE );
|
|---|