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

Re: [MacPerl] Recognizing Unix Line Breaks



Matthias Ulrich Neeracher wrote:
>Oh, I'll be prepared to make either of these changes if you force my cold,
>dead
>fingers to the keyboard of my Mac :-)

Don't you have any gloves?

>(Actually, I have no philosophical objections against Lasse's proposal but the
>effort to implement it is prohibitive. Juergen's proposal is simple to
>implement, but I'm totally opposed to it.)

Actually, we have a \s, except it's called $/. Problem is, everybody else
seems to use \n instead. :-) So what we need is some way to make \n mean
what we need it to mean. (Not want it to mean, I'd rather everybody agreed
to the same linebreak convention everywhere. Well, with Rhapsody this
problem will probably be handled somehow.)

I'm absolutely not in any position to dispute or doubt your saying the
effort is prohibitive. But may I out of pure curiosity ask as to why it is
so?

As I said in my first reply on this, there is a suboptimal solution to this
(use \012 to mean LF, \015 to mean CR, and $/ to mean platform-specific
line break, changing it when necessary), which only requires a little extra
effort of the programmer (and the extra time it takes to figure out when a
module you didn't write yourself forces $/ to \n behind your back.) So
there is no big need for implementation. The case where one has to
manipulate a foreign-platform file in its native format on a different
platform is probably rare for most people anyway.

-Lasse



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