in reply to Re^2: Trying to do multiple while loops on the same input file
in thread Trying to do multiple while loops on the same input file
It is much less a Perl way of doing things and more of an OS way of doing things. Perl gives you the seek function to do exactly what you want. Operating systems are made to handle 1kB files and also handle 3gB files. For your particular problem everything can be stored in ram (and possibly in a cache). For other problems the whole file cannot be stored in RAM.
I am sorry that you spent hours looking for the issue. Trust me when I say that learning how file reading works will help you no matter what language you are using. I personally do not know of a language that provides the functionality that you desire in the basic read(file).I can tell you that C, C++, C#, Java, Perl and Python all read files in a start to finish manner.
Update: fixed small typo.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Trying to do multiple while loops on the same input file
by elef (Friar) on Jun 01, 2011 at 15:07 UTC | |
by zek152 (Pilgrim) on Jun 01, 2011 at 15:28 UTC |