You should be able to use LWP et all, or HTTP::Body

#!/usr/bin/perl -- use strict; use warnings; use LWP; use HTTP::Request::Common qw/ POST /; use Encode ; my $url = q[http://localhost/]; my $req = POST( $url, Content_Type => 'multipart/form-data', Content => [ fileuploadfieldname => [ undef, # filename_to_read encode("UTF-8", qq'stupid \x{8216}smart\x{8217} and "quoted" filename. +txt'), -content => 'stupid content' ], ], ); dd( $req = $req->as_string ); { $req = HTTP::Request->parse ( $req ); $req = HTTP::Response->new(200, "OK", $req->headers, $req->content + ); $req = HTTP::Response->parse( $req->as_string ); $req = HTTP::Response->new(200, "OK", $req->parts ->headers ); dd( $req ); } dd( $req->filename ); sub dd { use Data::Dumper; print Data::Dumper->new([@_])->Useqq(1)->Dump, "\n"; } __END__ $VAR1 = "POST http://localhost/\nContent-Length: 169\nContent-Type: mu +ltipart/form-data; boundary=xYzZY\n\n--xYzZY\r\nContent-Disposition: +form-data; name=\"fileuploadfieldname\"; filename=\"stupid \350\210\2 +26smart\350\210\227 and \\\"quoted\\\" filename.txt\"\r\n-Content: st +upid content\r\n\r\n\r\n--xYzZY--\r\n"; $VAR1 = bless( { "_content" => "", "_rc" => 200, "_headers" => bless( { "content-disposition" => "form +-data; name=\"fileuploadfieldname\"; filename=\"stupid \350\210\226sm +art\350\210\227 and \\\"quoted\\\" filename.txt\"", "-content" => "stupid content" }, 'HTTP::Headers' ), "_msg" => "OK" }, 'HTTP::Response' ); $VAR1 = "stupid \350\210\226smart\350\210\227 and \"quoted\" filename. +txt";

update: ok, so i ddg://"multipart/parallel" ddg://site:perlmonks.org "multipart/parallel" site:search.cpan.org "multipart/parallel" and I learn its http://tools.ietf.org/html/rfc1521, so look for RFC1521 on cpan, say MIME::Tools/mimeexplode or Email::MIME or MIME::Explode


In reply to Re: multipart/parallel Respons via LWP::UserAgent by Anonymous Monk
in thread multipart/parallel Respons via LWP::UserAgent by gjetter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.