in reply to memory use array vs ref to array
Your 4.5 Gigs of memory will accommodate a maximum of 185,834 elements.
How does this compare with the record count in your file ?
More relevant is the question - WHY do you need to read the entire file into memory?
Typical/efficient parsing handles the file one line at a time.
IF it is necessary to store the file in memory, would it suffice to store the file in a scalar ? (You could do that by setting $/=undef; prior to reading the file).
...it is unhealthy to remain near things that are in the process of blowing up. man page for WARP, by Larry Wall
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: memory use array vs ref to array
by hippo (Archbishop) on Sep 08, 2016 at 08:36 UTC | |
by dkhosla1 (Sexton) on Sep 21, 2016 at 03:21 UTC |