On Mon, Nov 25, 2002 at 02:43:46AM +0900, Dan Kogai wrote: > On Monday, Nov 25, 2002, at 01:05 Asia/Tokyo, Chris Nandor wrote: > >The bottom line was that it'd be nice to have a PerlIO filter for perl > >5.8.x, so that MacPerl can execute Unix and Windows text files, and > >Mac OS X > >perl can execute Mac OS text files, etc. Patches are surely welcome! > >:-) > > One good question may be how to handle newlines in heretext, the only > part that really matters because that's the only exception to the fact > that newlines are nothing but whitespace from perl compiler's point of > view -- oops, shebang is another.
Newlines also serve as comment terminators; the perl compiler must recognize either \012 or \015 as the end of a comment. (I recall struggling to demonstrate some code during a Perl Mongers meeting. The script ran, but it didn't produce any output, nor did it produce any error messages! I finally figured out that perl on the OS X machine was seeing the whole script as one long comment, starting with #!/usr/bin/perl ... :) Ronald