in reply to Re: Text::CSV_XS and line-endings
in thread Text::CSV_XS and line-endings

Since we don't know what OS the client was running, perhaps
# Convert CRs and CRLFs to LFs $file =~ s/\015\012?/\012/g;
is best. Are LFCRs a possible concern?

Replies are listed 'Best First'.
Re^3: Text::CSV_XS and line-endings
by snowhare (Friar) on Mar 17, 2006 at 12:32 UTC
    Use Text::FixEOL to fix messed up line endings. It does the sane thing for even really messed up line endings in most cases. That is what it was written for.
    use Text::FixEOL; # Convert EOLs in the $file string to unix conventions my $fixer = Text::FixEOL->new; $file = $fixer->to_unix($file);