"Rob Dixon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jamie Risk wrote:
> > I've no control over the EOL of text files that I'm processing; is
> > there a conveniant method using chomp() and the
> > INPUT_RECORD_SEPERATOR ($/) to handle DOS/UNIX/MAC generated text
> > files automatically?
>
> If it helps, Perl is clever about what system it's running on, and
> sets $/ and 'chomp's behaviour accordingly. But otherwise, as the man
> said
>
> Wiggins D'Anconia wrote:
> >
> > Handle them how?
>
>
> Rob

On the unix system in question, a lot of text files are sent via binary
method; particular culprits are samba users mounting unix drives from there
Windows/MAC machines.  I understand that PERL sets $/ according to the sytem
it is running on; but that isn't always sufficient when I use chomp().
Short of writing my own chomp_() to handle any system's text file, I was
wondering if there already existed a PERL command to strip trailing white
space (including various combinations fo CR & LF) regardless of the hosts
defined INPUT_RECORD_SEPERATOR (i.e. is there already a function to "handle"
this)?

- Jamie




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to