Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: search-and-replace in files

by tune (Curate)
on May 20, 2003 at 20:12 UTC ( #259563=note: print w/replies, xml ) Need Help??


in reply to search-and-replace in files

You are changing the file only in memory :-)

Write all the lines including changed ones into a variable, and then when you're done with reading the file, open it again for writing. Then write the content of your variable into it.

--
tune

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://259563]
help
Chatterbox?
[hippo]: But APR.pm is under vendor_perl in your error message so you are mixing up modules installed from the packager and by hand. That's rarely a good plan.
[vedagiri89]: the prm is..works fine if i run file directly..not working if i run through apache http file
[hippo]: Environments differ.
[vedagiri89]: so, how to fix that differ
[choroba]: option one is install everything from the vendor
[choroba]: option two is install everything by hand
[choroba]: option three is mixed the two, but know well what you're doing

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2018-06-19 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (113 votes). Check out past polls.

    Notices?