use warnings; use strict; use File::Edit::Portable; my $rw = File::Edit::Portable->new; my $file = 'scrap.txt'; # show what endings the file has currently print $rw->recsep($file, 'hex') . "\n"; my @contents = $rw->read('scrap.txt'); # rewrite the file with the desired record separator $rw->write( contents => \@contents, recsep => "\n" ); # check to see if it took print $rw->recsep($file, 'hex') . "\n"; #### \0d\0a # before (\r\n) \0a # after (\n) #### :set ff=unix