On 23/8/05 5:51, Quanah Gibson-Mount <[EMAIL PROTECTED]> wrote:

> This was actually just recently discussed.
> 
> You could, I would think, use perl itself to clean up the \r\n fairly
> easily. ;)
> 
> $line =~ s/\r\n//;
> 
> for example, rather than chomp.

Or if you wanted to cope with other mutant kinds of line ends:

    $line =~ s/[\r\n]+$//;

(Dunno if that's more efficient that /\r?\n?$/ but they'd both catch
old-style Mac linebreaks.)

Cheers,

Chris


Reply via email to