#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI ':standard'; open MAINFILE, "../test/MAINFILE.TXT" or die $!; my @all = ; close MAINFILE; open HOST, "../test/HOSTS.TXT" or die $!; foreach my $line () { chomp $line; open HOSTFILE, "> ../test/results/MAINFILE_$line.txt" or die $!; print HOSTFILE "@all"; close HOSTFILE; } close HOST; print "Content-type: text/html\n\n"; print "done";