in reply to Re^2: Perl stops reading __DATA__ when meeting SUB character on Windows
in thread Perl stops reading __DATA__ when meeting SUB character on Windows

That is its function - to armor binary data in an ASCII-only environment. It is (IIRC) how binaries were distributed on NNTP, for example.

--MidLifeXis

  • Comment on Re^3: Perl stops reading __DATA__ when meeting SUB character on Windows

Replies are listed 'Best First'.
Re^4: Perl stops reading __DATA__ when meeting SUB character on Windows
by yfnecz (Novice) on Jan 03, 2014 at 16:40 UTC
    Thanks, I tired putting base-64 encoded binaries to the DATA, and then decoding and writing to file. It works! Thanks for your help :)