in reply to Re^2: Windows file read
in thread Windows file read
outputs{ 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>; }
5 7
If you remove the assignment to $/, the output is
5 3 4
|
|---|