Perl: the Markov chain saw | |
PerlMonks |
Re: Update config file parametersby u65 (Chaplain) |
on Jan 05, 2016 at 11:59 UTC ( [id://1151945]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|