Hi Jeff

Jeff wrote:
> I am attempting to use the File::Find module to go through all directories and 
> subdirectories
> and preform a search and replace function.  I am simply opening each file and line 
> by line
> comparing to an input string parameter.  If I find it, I replace with the input 
> replace
> string, and keep on going, one file at a time, one line at a time. 1) Why does the 
> opening
> and reading of image file mess up the files if nothing more is done to them then 
> opening and
> reading line by line?

It can't. Are you sure it's your program that damaging the file? If you have no output
statements at all then there's no way you can be altering the file. If you post the 
code
we should be able to see the problem. You could use the -T file test to ignore non-text
files, but I'd like to know what your problem really is.

> 2) Does anyone know of a module out there that does global search and replace on 
> whole
> directories and all subdirectories?

You could take a look at File::Searcher, but it shouldn't be too difficult going the
way you are.

Cheers,

Rob




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to