in reply to SLURP Error

Hi,

when you look at the source of File::Slurp you see the following line:

${$buf_ref} =~ s/\015\012/\n/g if $is_win32 && !$opts->{'binmode'};

This is done after reading the whole file which is in your case very big. So, you can do a litte test and do the same substitution command on the variable $text_file to see whether some memory or implementation boundaries are hit.

You can also make the test vica versa setting the option 'binmode' to true to circumvent the substitution command.

How many lines do you have in the text file?

UPDATE: Have a look at this thread: Substitution Loop.

Regards
McA

Replies are listed 'Best First'.
Re^2: SLURP Error
by Anonymous Monk on Oct 10, 2014 at 13:42 UTC

    Thanks McA

    The typical file I want to handle is c 2.8GB with 100 m records

    I am using Slurp 9999.19 I will review using binmode as an alternative