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

[MacPerl] line separators



Chris Nandor wrote:

> MOST modules can be installed in this manner:
> 
> 1.)  Make sure linebreaks are converted from UNIX to Mac.

Just a thought. Wouldn't porting Perl code from Unix to the Mac be a lot easier, if 
we wouldn't have to worry about such mondane things like a line terminator?

Many MacPerl programmers have wasted hours, or even days, tracking down bugs caused 
*only* by this.

In general, Perl doesn't care about line endings: a line break is white space. 
Comments and the "here-is" syntax are the only exceptions that spring to the mind.

For this to be realized, MacPerl "only" would only need to treat 
/\015\012|\015|\012/ on a multiline pattern match, as a valid line separator for 
it's scripts.


Manipulating cross-platform text files would be simpler too, if we could do the 
same on input files. <sigh>

-- 
		Bart Lateur
		Gent (Ghent, Gand),
		Belgium,
		Europe,
		3rd planet from the sun.