in reply to Re: Re: Re: finding different linebreaks with <>
in thread finding different linebreaks with <>

Dear Tilly,

Thanks so much for your help, I've downloaded and used File::Stream to great success. I'm using the regular expression below:

my ($handler, $stream) = File::Stream->new(\*FILE, separator => qr{[\c +M\r\n][\cM\r\n]?});

Does anyone see any pitfalls with this one? I wanted to make sure I got all three 'types' of characters.

Thanks
Sam

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: finding different linebreaks with <>
by tilly (Archbishop) on Apr 09, 2004 at 18:15 UTC
    That RE will incorrectly read 2 returns as just one.
      True, but empty lines are no use to me anyway.