bigtiny has asked for the wisdom of the Perl Monks concerning the following question:
I've been searching around and having trouble finding the info I need to understand this. So, if your answer to this is to point me to the relevant doc, that's fine!
I'm writing a script that will use a large external data file. In some cases, I'll just need to grab a record out of the file -- no problemo. However sometimes I may need to read the whole file. We're talking over a million records here.
I know from past experience that trying to suck something like this up into a big data structure can be hazardous. I'm wondering if this: while (<INFILE>) is any better?
Are there other techniques I should use to traverse a large file like this and which might offer methods to move forward, back, go to beginning, etc.?
Any advice or pointers would be appreciated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help reading from large file needed
by CountZero (Bishop) on Oct 12, 2010 at 20:51 UTC | |
|
Re: help reading from large file needed
by BrowserUk (Patriarch) on Oct 12, 2010 at 21:29 UTC | |
|
Re: help reading from large file needed
by kcott (Archbishop) on Oct 12, 2010 at 21:11 UTC | |
|
Re: help reading from large file needed
by roboticus (Chancellor) on Oct 12, 2010 at 21:22 UTC | |
|
Re: help reading from large file needed
by dasgar (Priest) on Oct 12, 2010 at 22:59 UTC | |
|
Re: help reading from large file needed
by locked_user sundialsvc4 (Abbot) on Oct 13, 2010 at 01:36 UTC |