Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
In addition to the approach involving reading the file into an array as suggested by Chmrr above, I would introduce you to the perlfunc:seek function, which allows you to move the current file read/write pointer within a file. With this command, you can move back to the start of the file and re-read it in full without closing and reopening the file. Eg.
This approach is advantageous where the file may be particularly large in size and resources may be constrained.
In reply to Re: read a file twice...
by rob_au
|
|