in reply to Re: How to control UNIX vs DOS line feeds in Perl
in thread How to control UNIX vs DOS line feeds in Perl

Working with perl on my windows machine : $file = $ARGV[0]; chomp $file; open ( TXT , "< $file" ) or die " Could not find file : $file\n"; open ( NEW , "> $file.ttt" ); # must use binmode on the open filehandles binmode TXT; binmode NEW; while ( <TXT> ) { print NEW $_ if s/\r\n$/\n/; } print "converted to file : $file.ttt\n";
  • Comment on Re: Answer: How to control UNIX vs DOS line feeds in Perl