in reply to Re^2: Windows file read
in thread Windows file read

It works for me. Show your code, please. Mine is the following:
{ open(my $fh, '>:raw', 'file') or die("open>: $!\n"); print $fh ("abc\x{0D}\x{0A}de\x{0A}fg\x{0D}\x{0A}"); # [------5------][---------7----------] # [------5------][---3--][------4-----] } { open(my $fh, '<:raw', 'file') or die("open<: $!\n"); local $/ = "\x0D\x0A"; print length, "\n" while <$fh>; }
outputs
5 7

If you remove the assignment to $/, the output is

5 3 4