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^

Attachment: pgp1gy1CHtDK1.pgp
Description: PGP signature

.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='

Reply via email to