#!/local/bin/perl use CGI; my $cgi = new CGI; my $file = $cgi->param('uploadfile'); $file=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the filename my $name = $2; open(LOCAL, ">$name") or die $!; while(<$file>) { print LOCAL $_; } print $cgi->header(); print "$file has been successfully uploaded... thank you.\n";