Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: match and edit block of text

by rg0now (Chaplain)
on Jun 03, 2005 at 07:14 UTC ( #463145=note: print w/replies, xml ) Need Help??


in reply to match and edit block of text

By the way: why not using prefab code, like Apache::Admin::Config? Apache::ConfigFile is worth a look, too...

Update: here is the code. Instead of commenting out the offending section you can just simply remove it like this:

use strict; use warnings; # remove the <Directory "/opt/apache_2.0.48/icons/"> section use Apache::Admin::Config; my $conf = new Apache::Admin::Config "your_apache_conf.conf" or die $Apache::Admin::Config::ERROR; my $section = $conf->select('section', 'directory', '"/opt/apache_2.0. +48/icons/"'); $section->unlink; print $conf->dump_raw;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://463145]
help
Chatterbox?
[tye]: gah, Benchmark needs some serious work.
[tye]: though, really, I just replace with single calls to clock_gettime( CLOCK_PROCESS_CPUT IME_ID)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-02-23 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (338 votes). Check out past polls.