RE: Unix vs DOS EOL ...

2003-02-06 Thread Bob Showalter
Jamie Risk wrote: > Okay, I do know that binary transfer of a text file between DOS and > Unix systems is a non-non, but my Samba setup isn't that > discriminating. > > Perl is running on a Unix platform, and 'chomp' isn't quite up to the > task of removing CR (ASCII '\r' or 0x0D). It is if you

RE: Unix vs DOS EOL ...

2003-02-06 Thread Kipp, James
> > > Okay, I do know that binary transfer of a text file between > DOS and Unix > systems is a non-non, but my Samba setup isn't that discriminating. > > Perl is running on a Unix platform, and 'chomp' isn't quite > up to the task > of removing CR (ASCII '\r' or 0x0D). > So I tried: > s/(.+)

Re: Unix vs DOS EOL ...

2003-02-06 Thread Jamie Risk
> So I tried: > s/(.+)[ \t\n\r]*/$1/ > but those tricky little CR are still there. Even > s/(.+)[ \t\n\r\015]*/$1/ > still eludes me. And then I tried: s/([^\n\r]+)[ \t\n\r]*$/$1/; which does work, but seems overly finicky to get rid of BG's legacy. Is there a better way? -- To unsubscr

Unix vs DOS EOL ...

2003-02-06 Thread Jamie Risk
Okay, I do know that binary transfer of a text file between DOS and Unix systems is a non-non, but my Samba setup isn't that discriminating. Perl is running on a Unix platform, and 'chomp' isn't quite up to the task of removing CR (ASCII '\r' or 0x0D). So I tried: s/(.+)[ \t\n\r]*/$1/ but those