## -- Including all conf file for each web application ## -- Assuming here that mod_perl is included in apache2 my $folder = $ENV{WEBAPPS_DIR}; if (-e $folder) { opendir my $web, $folder or die "cannot open dir $!"; my @dirs = map {"$folder/$_"} grep {/^[A-Z, a-z,\-]+$/} readdir $web; closedir $web; for my $name(@dirs) { my $config = "$name/deploy/apache.conf"; if (-e $config) { push @Include,$config; } } }