grinder has asked for the wisdom of the Perl Monks concerning the following question:
People, does anyone know of a module that does the following?
I have a program that takes a file and processes it.
Some time later, I want to run the program again on the same file, but this time, when the file is opened, the file pointer is positioned to pick up where it left off last time. The first read will then resume from the line n+1, with respect to the previous run.
Obviously this involves a trivial amount of work with seek and tell, and some way of squirrelling away the necessary context somewhere else.
There's nothing under IO::File, and searching for 'file', 'read', 'resume', 'reopen' and/or 'seek' doesn't turn anything up. Any pointers welcomed.
• another intruder with the mooring in the heart of the Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading from where I left off
by gri6507 (Deacon) on Jan 12, 2006 at 16:34 UTC | |
|
Re: Reading from where I left off
by merlyn (Sage) on Jan 12, 2006 at 16:36 UTC | |
by VSarkiss (Monsignor) on Jan 12, 2006 at 17:51 UTC | |
|
Re: Reading from where I left off
by swampyankee (Parson) on Jan 12, 2006 at 17:13 UTC | |
|
Re: Reading from where I left off (tmi)
by tye (Sage) on Jan 13, 2006 at 08:06 UTC |