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

Re: [MacPerl] MacPerl and OS X (yet again :-)



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 *



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