use strict; use warnings; # remove the 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;