Apr 18, 2011, 11:46 PM
Post #1 of 6
putting 500K rows into an Array?
I'm having problem trying to load a file into an array.
The file is more than 500,000 lines and I am trying to load it using the following:
@FileData = <FILE>;
This works fine for files up to 480K lines, no problem. But once the file is above 500K then it just stops
and never get to the next line of code in the perl script. I've been using this few lines for many years now
and this is the 1st time I c this happening. I put some debug lines in to just simply print a message in between
every line of code and found it reached the line @FileData = <FILE>;
and then that's it.
I am on ActivePerl v5.6.1 built MSWin32-x86-multi-thread (I know, it's old) and have 3.8Gb ram (with 1.9Gb free
at point of execution of the code). I didn't observe any major RAM drain during the runs.
Is there a Limit in Perl Array size? I can't ever remember reading a limit from any where.
Thx a million