in reply to Perl stops reading __DATA__ when meeting SUB character on Windows

How about uuencoding / uudecoding the __DATA__ section?

--MidLifeXis

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

Replies are listed 'Best First'.
Re^2: Perl stops reading __DATA__ when meeting SUB character on Windows
by yfnecz (Novice) on Jan 03, 2014 at 14:52 UTC
    I thought about base 64, but not so sure that all the binary data can be encoded/decoded correctly. What do you think?

      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

        Thanks, I tired putting base-64 encoded binaries to the DATA, and then decoding and writing to file. It works! Thanks for your help :)