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

[MacPerl-Forum] [MacPerl] newline conversion (was MacPerl and OS X (yet again :-))



Well, near as I can tell, Perl is an applied language, not an abstract 
language. The run-time provides most of the compile-time libraries and 
tools. This is a GOOD thing, and one of the reasons I think I like Perl. 
So, if the compiler were nice enough to accept all the usual newlines, 
then I would have to try to be happy with automatic newline conversion in 
my default run-time libraries, too.

Joshua wrote:
>At 10:30 PM -0400 2000-09-25, Chris Nandor wrote:
>>At 11:00 +0900 2000.09.26, Joel Rees wrote:
>>>Adding options to cp is probably not a good idea. Better to write your
>>>own cp with newline filtering options. Or, better still, just save the
>>>one-liner Chris mentions here as a script (say, newlnfilter) and pipe I/O
>>>that needs to be filtered through your brand-new filter:
>>>
>>>     % cat source.pl | newlnfilter > target.pl
>>
>>That's all true, but I specifically had in mind the h* tools I used to use
>>in  the MkLinux distributions, like hcp that would do newline conversions
>>for you and copy from mounted HFS volumes.  I don't really care what method
>>is used, except insofar as Joe User has an easy go of it.
>
>Of course, the ideal solution would be tools that don't care what kind of
>newlines their input files use.  Any language that distinguishes between
>text mode and binary mode can be implemented in a newline-independent way.
>Of course, code that relies on text mode behaving like binary mode (ergo
>which is non-portable) will break.  Then again, breaking non-portable code
>may be a virtue.
>
>Yes, I'm still annoyed about "Oh, don't bother with binmode -- it's a
>no-op".  But that has nothing to do with whether perl does newline
>translation on its own input files or not.
>
>Josh
>
>--
>Joshua Juran                          Metamage Software Creations
>=)                                         Tools for Wizards
>wanderer@metamage.com
><http://www.metamage.com/>   * Creation at the highest state of the art *
>


----------------------------------------
 Joel Rees             Keeping the Faith
                 joel_rees@sannet.ne.jp
 http://www.page.sannet.ne.jp/joel_rees


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-forum-request@macperl.org