#!/usr/bin/perl @array = `cat domains`; chomp @array; $j = '0'; %hash = (); foreach $dom (@array) { $dom =~ s/^\s+//; $dom =~ s/\s+$//; print < /etc/awstats/awstats.$dom.conf.new"); system("mv /etc/awstats/awstats.$dom.conf.new /etc/awstats/awstats.$dom.conf"); }