That's not quite how things work in Win32. When reading from a file, Ctrl-Z is never special, just like in unix. The behaviour you described only applies when reading from a terminal.
{ open(my $fh, '>', 'deleteme.tmp') or die("Unable to create work file: $!\n"); binmode($fh); print $fh ("abc\r\n\cZ\r\ndef\r\n"); } { open(my $fh, '<', 'deleteme.tmp') or die("Unable to read work file: $!\n"); # Not binmode. print <$fh>; }
In reply to Re^2: EOF character
by ikegami
in thread EOF character
by henrikbe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |