>-----Original Message-----
>From: Paul Cotter [mailto:[EMAIL PROTECTED]]
>Sent: Monday, May 14, 2001 10:25 AM
>To: Mike Lacey; [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: CR LF with UNIX and Windows (DOSish?)
>
>
>But if 'you' are using seek why have carriage returns anyway? It's not
>usually a good idea to have paper control embedded in fixed
>length records.
>If the problem is to print it then that can be done with a
>four line perl
>script, which is probably less lines than the modification to support
>multiple platforms.
The way I have always done fixed-length records is to read the line in with
whatever method to grab a line of text from a file, then strip the newline,
and split apart that string. I've have never done this in Perl, actually,
but have done it many times in C with thios method. This way it doesn't
matter what you end your lines with (and you can even configure any kind of
character to end the record if you want). Likewise, with writing the file
out -- you write the raw string then append the end of record character,
whatever that is.
-- Brett