#!perl # Store.pl: sits on a web server waiting to store a file. use CGI; open(LOG,">upload.log"); my $q=CGI->new(); $q->header(); $q->start_html(); my $client = $ENV{'REMOTE_ADDR'}; print LOG "Client: $client\n"; $file = $q->param("upload_file"); print LOG "File: $file\n"; $client =~ s/\./_/g; open(FH,"> c:/upload/$client.txt") or die($!); binmode FH; my $fh = $q->upload($file) or print LOG "Error uploading file $!\n"; print $fh; while (<$fh>) { print FH $_; } $q->end_html(); close(FH); close(LOG);