Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Update config file parameters

by u65 (Chaplain)
on Jan 05, 2016 at 11:59 UTC ( #1151945=note: print w/replies, xml ) Need Help??

in reply to Update config file parameters

Welcome to the monastery!

First of all, you should look at perlbrew which allows you to easily use whatever version of Perl 5 you want.

Second, I would simply read the file line by line, split on the equal sign, change the value for that key as desired, and rewrite the pair to the file. You could either copy the original file to a temp file for the reads, or write to a temp file and rename it to the original name after closing it.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2021-04-13 01:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found