[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Re: Newlines



At 11.02 10/13/97, Mark F. Murphy wrote:
>Is MacPerl going to only be able to read Mac formated files for end of
>lines?  I haven't gotten that far in my testing yet to see what I'll run
>into.

The default input record separator is \015 for MacPerl.  But if you want all your scripts to read in the same file, you can set it to \012 or something.

#!perl
$/="\012";

That will make it so while(<>) will iterate over UNIX LFs.  And you can put the same line in the same script on UNIX, and it won't make any difference to it (unless you change it elsewhere in the script), as that is the UNIX default anyway.


>So far, my port is having some problems.... MacPerl seems to give some
>compiler warnings that Perl under BSDI does not give (variables not being
>used, etc).  I suspect it's having some issues with some of my eval'd code
>with similar issues.
>
>Maybe 'use strict' works slightly different under MacPerl?

Nope.  It is likely you have different versions of perl running.  MacPerl 5.1.4r4 is based on the perl5.004_00 sources.  I bet that your BSDI perl is a previous version.  MacPerl 5.1.3r2, BTW, was based on perl5.002 sources.

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==            MacPerl:  Programming for the Rest of Us            ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch