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

Re: [MacPerl] UNIX Line Breaks



>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.

These three lines are from an MPW Toolserver script I use to read html documents.

perl "{GEperl}"
perl "{JNLperl}"
perl -012 "{PUTperl}"

The third line accesses an html file which has UNIX line ends. The -012 is a switch which directs the MacPerl tool to use linefeeds as the normal end of line terminator in all <READ> operations. That's a leading zero indicating an octal number.

I'm pretty sure there's a way, using #!/usr/bin/perl, to do the same thing in a MacPerl script without using MPW.
-- 

-> From the U S of A, the only socialist country that refuses to admit it. <-

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