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

Re: [MacPerl] UNIX Line Breaks



On Sat, Dec 09, 2000 at 10:52:34AM -0500, Floyd Resler wrote:
> I need to read a UNIX file in MacPerl.  I know I can read the file as
> one variable.  What I don't know how to do is break the text up into
> individual lines based on the UNIX line break.  Can anyone help?

MacPerl swaps the meanings of "\n" and "\r", so to read a Unix file in
MacPerl you would:

$/ = "\r";

Ronald


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