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

Re: [MacPerl] Recognizing Unix Line Breaks



John W Baxter <jwblist@olympus.net> writes:
}Whatever solution might be adopted into MacPerl would need to make here
}documents work right (whatever right means).  If writing here documents
}out, one would like the line endings to match the rest of what one writes
}out.

Presumably it just uses whatever your editor puts in the file, which, since
MacPerl needs \015 for the rest of the script, is \015.  You can always put
in explicitly what you want, but it seems you can never deal with the last
one:

#!perl

print <<ENDIT;
This is a line.\012This is another line.
ENDIT

because the hereis string has to be on a line of it's own.

Personally I don't think that anything really needs to be done.  It's far
easier to just transfer the text files properly and/or switch the
end-of-lines, which can be done automatically, rather than fooling around
maintaining Unix files on a Mac (or vice versa).  And if you really need to
use Unix files, the tools MacPerl provides are more than adequate to deal
with them.  Not that I'd necessarily mind something like \s, but I'd
probably never use it, even though I transfer text back and forth between
platforms all the time.

}
}   -- John
}
}--
}John Baxter (Born before ENIAC, but not by much.)
}   jwblist@olympus.net      Port Ludlow, WA, USA
}
}
}

---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us



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