OK. First you will get more help if you are not rude. Second it is more efficient to do:
renane /etc/named.conf /etc/named.conf.bak or die $!; open BIND, ">/etc/named.conf" or die $!; print BIND "DeathBunny!";
I assume that you don't understand the callback/subclassing parsing strategy used by a number of perl parsers. Essentially what happens is that the parser rips through the file and passes the chunks of info it finds to a range of handlers. You will find a simple HTML::Parser example of mine at Re: Tag filtering: a standard mechanism?. This should give you the general idea. You will either be writing to your new file from these callback subs or storing the data in a data structure of your choosing for later post processing and file write.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Re: Re: Re: Re: Reading and *writing* configuration files
by tachyon
in thread Reading and *writing* configuration files
by DeathBunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |