in reply to Need to sort comma delimited, double quoted file

since files could be much larger

Exactly, how large? The important thing here is to know if the data would fit into your computer RAM or not when expanded into Perl data structures.

That would tell you if you need to use an internal or an external sorting algorithm.

Update: BTW, use Text::CSV_XS instead of Text::CSV.

  • Comment on Re: Need to sort comma delimited, double quoted file

Replies are listed 'Best First'.
Re^2: Need to sort comma delimited, double quoted file
by Lotus1 (Vicar) on Jul 25, 2017 at 12:36 UTC

    My understanding is that Text::CSV is just a wrapper for Text::CSV_XS now so no need for people to worry about which one to use. If you are on a platform that makes XS modules difficult to install then you can install the pure Perl version and let Text::CSV fall back to that. The advantage is that using Text::CSV makes your program more portable.

    DESCRIPTION

    Text::CSV is a thin wrapper for Text::CSV_XS-compatible modules now. All the backend modules provide facilities for the composition and decomposition of comma-separated values. Text::CSV uses Text::CSV_XS by default, and when Text::CSV_XS is not available, falls back on Text::CSV_PP, which is bundled in the same distribution as this module.