That it predates your history with Perl on MS Windows (or just your memory) doesn't cause thaat history to no longer exist.
1. The OP is using binmode. That should never stop at ^Z!
2. Unless you're saying the OP is using a Perl older than 5.6, I don't see your point. I consider anything older than 5.8 irrelevant unless explicitly mentioned.
Your program produces 4 for me, whether bindmode is commented out or not (v5.12).
Then I ask you the same question I asked the OP: Could I see your perl -V output?
Update: I'm sure I had an old version of Perl that didn't treat ^Z specially, but it doesn't seem to be the case. It does appear to be a new fix, so disregard the request. I couldn't test until now.
In reply to Re^3: Perl stops reading __DATA__ when meeting SUB character on Windows (history)
by ikegami
in thread Perl stops reading __DATA__ when meeting SUB character on Windows
by yfnecz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |