in reply to how do i reset a filehandle?
I say that this can be handled many ways. My favorite is to read the whole file into a string/array/hash to then do search and replace and testing of the text.
open(INFILE, "infile.txt"); my $filesize = -s INFILE; read(INFILE, $temp, $filesize); close(INFILE); $temp = /(regex here)/; and your other stuff here
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: how do i reset a filehandle?
by kryten (Scribe) on Jun 01, 2000 at 14:45 UTC |
In Section
Seekers of Perl Wisdom