in reply to Re: Text CSV_XS memory crash
in thread Text CSV_XS memory crash

$ csv-check ozone_2007.csv Checked ozone_2007.csv with csv-check 1.5 using Text::CSV_XS 0.80 OK: rows: 756689, columns: 8 sep = <,>, quo = <">, bin = <0>, eol = <"\r\n"> $ perl ozone.pl ozone_2007.csv Reading ozone_2007.csv with Text::CSV_XS-0.80 ... Data size = 4194400, total size = 409046824 $ cat ozone.pl #!/pro/bin/perl use strict; use warnings; use autodie; use Text::CSV_XS; use Devel::Size qw( size total_size ); my $file = shift; print "Reading $file with Text::CSV_XS-$Text::CSV_XS::VERSION ...\n"; my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 }); open my $fh, "<:encoding(utf-8)", $file; my $dta = $csv->getline_all ($fh); printf "Data size = %d, total size = %d\n", size ($dta), total_size ($ +dta); $

or in a one-liner

$ perl -MDevel::Size -MText::CSV_XS -wle'print Devel::Size::total_size +(Text::CSV_XS->new()->getline_all(*ARGV))' ozone_2007.csv 409046824 $

Enjoy, Have FUN! H.Merijn