sub write_file() { my $filehandle = shift; my $type = uploadInfo($filehandle)->{'Content-Type'}; die "text files only at this point" unless ($type eq 'text/plain' or $type eq 'text/html'); print "file: $filehandle of type $type\n\n
";
 open (FH, ">d:/inetpub/wwwroot/repnet/docs/$filehandle")
      or  die "cannot create file: $!";
 while (<$filehandle>) {
 	$_ =~ s/\r//g;
 	print;
 	print FH;
	
	}
 print "
"; close(FH); }