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

Re: [MacPerl] Recognizing Unix Line Breaks



At 12:51 +0200 05.05.97, Lasse Hillero/e Petersen wrote:

>Anyway, an option simply to use \n as \012 and \r as \015 in MacPerl would
>be very nice IMHO. Ideally, this could be set by each script as an option
>on the #! line, and would work with Unix Perl as well, the option letter b
>(for backslash) seems appropriate and is currently unused. Default
>behaviour could be set in the Preferences for MacPerl.

A command line option would be ok. But I would very much prefer that perl
offered a \s or some such (s as in separator or slash -- cf. $/ -- for the
os-depended line break) instead and that ports would leave \r and \n
untouched. That \s could even be defined to expand to a two-byte sequence
(horror ;-) on platforms where such a sequence is known to delimit lines.

That would even allow for tests like

  print "good!" if "\n" eq "\s";

	--jc

--
Ju:rgen Christoffel, GMD - Forschungszentrum Informationstechnik GmbH
E-Mail: christoffel@gmd.de or one of {ftp,news,web}master@gmd.de



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