in reply to Using LWP to automate file upload

The documentation for POST in HTTP::Request::Common shows an example of how to do a file upload. You need to have an array ref with specific contents.

You might also look at WWW::Mechanize which has an even simpler interface (use the value method to set the file upload field to the filename you want to upload and then submit the form).

Replies are listed 'Best First'.
Re^2: Using LWP to automate file upload
by cdlvj (Novice) on May 04, 2007 at 20:53 UTC
    Kudos. That is it. Thank you.
    my $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); $res = $ua->post($url, Content_Type => 'form-data', Content => [ "ac" => 'upload', "file" => [ "$FILE" ], ] ); print $res->content, "\n";