Owen, I've had trouble doing this exact thing before with Perl regular expressions on AIX, I never got in and figured out what exactly was the root cause, but I just switched to the 'tr' command and it worked fine.
Something to try. -Tom Kinzer -----Original Message----- From: Owen [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 6:39 PM To: [EMAIL PROTECTED] Subject: Re: stripping last field of a carriage return On Sun, 07 Dec 2003 12:20:46 -0700 "Michael J. Golini" <[EMAIL PROTECTED]> wrote: > I have tried to strip the carriage return of the last field > > $field[8] =~ s/\015//g; You have to know how your original data was created. In Windows, each line is terminated by "\r\n" (carriage return followed by line feed). In Unix, lines end only in "\n". On old Mac systems, lines end only in"\r". You might want to look at it in a hex editor. Perl's record separator is $/ You can use this for portable programming. Unix is ASCII \012 Windows is ASCII \015\012 Mac is ASCII \015 chomp could be the way to go. See perldoc chomp -- Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>