Sorry code was bare bones (as well as untested :-). With CGI you need a valid header which I neglected with the upload sub. To call it from perl use LWP which is a perl HTTP client (effectively a very basic browser). There are a ton of LWP examples on this site, use Super Search. To call it from any client machine just use a browser and browse to the script on the server.
sub upload {
if ($q->upload( 'upload_file', $target )) {
print $q->header, "Uploaded ", $q->param('upload'), "OK\n";
}
else {
print $q->header, "Oops!\n";
}
}
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|