Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Searching and Replacing file content within directory

by mjscott2702 (Pilgrim)
on Nov 12, 2010 at 15:10 UTC ( #871069=note: print w/ replies, xml ) Need Help??


in reply to Re: Searching and Replacing file content within directory
in thread Searching and Replacing file content within directory

I too would advocate using the File::Find approach - only issue I can see with the solution from chrestomanci is that it doesn't update the files themselves.

To emulate what perl's -i switch does, first rename each file with an extension like .orig, open that new file for reading, and write output to the original filename.


Comment on Re^2: Searching and Replacing file content within directory

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://871069]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-07-08 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls