I am trying to write a script that will post a file to another script on another server via HTTP::Request. I seem to be unsuccessful and was hoping that someone could point out my mistakes. Here is the code that I have so far:
--------------------------- #!/usr/bin/perl -W use HTTP::Request; use HTTP::Response; use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->agent("Uploader/0.1 " . $ua->agent); my $url = "http://my.url/upload.pl"; my $base = "/www/htdocs/base"; my $request = HTTP::Request->new(POST $url); $request->content_type('form-data'); $request->content( [ mirror => 'download01', file => ["$base/File.exe"], ] ); my $response = $ua->request($request); if ( $response->is_success ) { print $response->content; } else { print "No Good\n"; } --------------------------- --- Thank You Jason Williard