in reply to Seek help posting to www-form-urlencoded . . .
use HTTP::Request::Common qw( POST ); my $request = POST($url, action => 'Count', name => 'datafile', Content_Type => 'multipart/form-data', Content => [ 'file' => [ $ballot_file ]] );
But you're not quite there yet. You have content fields outside of Content. Fixed:
use HTTP::Request::Common qw( POST ); my $request = POST($url, Content_Type => 'multipart/form-data', Content => [ file => [ $ballot_file ], action => 'Count', name => 'datafile', ], );
The example in the docs is
POST 'http://www.perl.org/survey.cgi', Content_Type => 'form-data', Content => [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', init => ["$ENV{HOME}/.profile"], ]
I don't know how you got from that to what you posted. Or maybe you didn't bother to read the docs...
|
|---|