http://qs1969.pair.com?node_id=130057


in reply to http upload simulating browser

you should use CODE tag.

File uploading via LWP is done like this (quote from perldoc: HTTP::Request::Common)

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"], ]
the point is
  • set content-type to multipart/form-data
  • use arrayref to indicate file upload

    --
    Tatsuhiko Miyagawa
    miyagawa@cpan.org