good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You can stream it and prevent memory hogs on big data. Additionally, install Text::CSV_XS for speed use Text::CSV_XS "csv"; Install Text::CSV_XS, yes, but don't explicitly use Text::CSV_XS. Text::CSV is smart enough to pull in the XS version if installed, and will fall back to pure Perl if not. There is usually no point in having the script break if XS isn't available.
I agree with your streaming suggestion. I had opted to keep my example simple given the 20k line input. Good to teach the streaming approach, though. ++
use strict; use warnings; omitted for brevity.
In reply to Re^3: Perl script for the post processing of one CSV file
by rjt
|
|