Re: opening a big file
| From: | Richard Lee | Date: | Mon, 07 Apr 2008 15:44:36 +0000 |
| Subject: | Re: opening a big file | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272648@lists.php.net to get a copy of this message | ||
Daniel Brown wrote:
On Sun, Apr 6, 2008 at 10:36 PM, Richard Lee <rich.japh@gmail.com> wrote:I am trying to open a big file and go through line by line while limiting the resource on the system. What is the best way to do it? Does below read the entire file and store them in memory(not good if that's the case).. open(SOURCE, "/tmp/file") || die "not there: $!\n"; while (<SOURCE>) { ## do something }Was there a reason this was sent to the PHP list as well? Maybe just a typo? def a typo.. sorry about that