in reply to Re: CSV SPLIT
in thread CSV SPLIT
I may now have more information about the problem I experienced a couple years ago. I now think that the problem I ran into was running out of memory under Cygwin (not positive) when processing a large number of files. I just ran a test under Linux to try to recreate the problem and ran out of memory when the code snippet below was inside a subroutine. if I moved the "my" line outside the subroutine there was no memory issue. Windows does not appear to have the same problem (memory usage remains steady). but it also looks like The Text::CSV code may be handling the split of the data I am using quite right - it looks like it has trouble with the combination of quoted fields and escape characters and probably escaped " characters in particular (not sure - still testing). but my main goal here is to alert people of the possible memory leak issue - Cygwin (32 bit) and Linux (32 bit) may have a problem and there may be others. I have reported a bug on CPAN.
my $CSV = Text::CSV_XS->new ({binary => 1, escape_char => "\\"}); + # need binary and change escape character if ($CSV->parse($line_to_split))
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CSV SPLIT
by Anonymous Monk on Nov 04, 2014 at 22:01 UTC |