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

Re: [MacPerl] UNIX Line Breaks





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?
> 
-------------------
I havent used MacPerl yet, but you *should* be able to:
@Lines = split('\n',$LongString) ;

the whole purpose of the perl \n is to take care of system dependant
interpretations of CR, LF, etc

D

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