Hi,
  here is the situation i have :

i have a long list of files in a directory. i have to
search and replace a particular pattern in each file.
since a file cannot be read and written to at the same
time, what's the best way of doing the search and
replace ?
i take this approach of doing the search and replace
and then writing the contents into a new temporary
file. then i close both the files. thereafter i write
the contents of  the temporary file into the original
file.

i am sure, there is a better efficient way of doing
it.
can anybody let me know.


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to