Modifing config files
Jayce^
jason at infogenix.com
Fri Feb 25 10:16:21 MST 2005
On Friday 25 February 2005 08:51 am, Nicholas Leippe wrote:
> I'm sure a couple of lines of perl could do it. At the very least:
>
> perl -p -i -e 's/^starttime.*$/starttime = 17:00/' bar.cfg
http://search.cpan.org/~wadg/Config-IniFiles-2.38/IniFiles.pm
http://search.cpan.org/~jenda/Config-IniHash-2.8/IniHash.pm
http://search.cpan.org/~rustyp/Config-Magic-0.76/
If using perl, check out the above. A couple of several OO interfaces to INI
style config files. Let's you use an OO or functional style to work with
ini's.
The second one is one of the most simple to read/write. The others provide
much more advanced interfaces.
--
Jayce^
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20050225/c2f811d8/attachment.bin
More information about the PLUG
mailing list