why doesn't this work? I am trying to upload a file to a webserver without actually doing it through a broweser but through a perl script. Here's the code;
use CGI;
use HTTP::Request::Common;
use LWP;
$ua = LWP::UserAgent->new;
my $res= $ua->request(POST 'http://server.com/cgi-bin/upload.cgi',
[description => 'a description',
filetoupload => 'c:/test.dat' ]);
if ($res->is_success) {print "success\n";}
else {print "failed $!\n";}
I always get "failed invalid argument". Any help much appreciated. by the way sqware brackets are included but don't show in the code above.
2001-12-06 Edit by Corion : Added Code tags