in reply to Creating Unix Friendly files in win32

If it's a problem with different line endings in a text file between unix and win32, you could open the file using the :crlf layer. For example, this script:
use strict; use warnings; open(my $fh, '<', 'test.txt') or die $!; my $count = 0; while (<$fh>) { $count++ if /\r/; } close $fh; print "Without :crlf, \$count=$count\n"; open($fh, '<:crlf', 'test.txt') or die $!; $count = 0; while (<$fh>) { $count++ if /\r/; } close $fh; print "With :crlf, \$count=$count\n";
will print out on a unix machine, for a 10-line file test.txt created on Win32,
Without :crlf, $count=10 With :crlf, $count=0