#!/usr/bin/perl -w use strict; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI ':standard'; use LWP::Simple; my ( $target, $key, $value, $page, $content ); my %list = ( "http://www.mysite.com/away/index.html" => "D:\inetpub\wwwroot\017172\1sdhpnc1\trial.html" ); while ( ($key, $value) = each (%list) ) { $target = $key; $page = $value; $content = get($target); #Actually send the request to the webserver die "Couldn't get $target!" unless defined $content; open FH, "> $page" or die $!; flock (FH, 2) or die "lock: $!"; print FH "$content"; } print "Content-type: text/html\n\n"; print "$content";