Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hi Monk, Here is my code:

use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $xmlfile = [ 'C:\\temp\\Test_1.xml', 'Test_1.xml', 'Content-type' => 'text/xml' ]; my $docfile = [ 'C:\\temp\\Test_1.doc', 'Test_1.doc', 'Content-type' => 'application/msword' ]; my $signedurl = ''; my $myresponse = $mech->put($signedurl, 'Content' => [ 'file1' => +$xmlfile, 'file2' => $docfile ] );

It is producing following ERROR:

Not a SCALAR reference at C:/Dwimperl/perl/vendor/lib/HTTP/ +line 156. at C:/Dwimperl/perl/vendor/lib/HTTP/ line 156 HTTP::Message::add_content('HTTP::Request=HASH(0x32e2d9c)', 'ARRAY(0x3 +2113f4)') called at C:/Dwimperl/perl/vendor/lib/HTTP/Request/Common.p +m line 108 HTTP::Request::Common::_simple_req(undef, undef) called at C:/Dwimperl +/perl/vendor/lib/HTTP/Request/ line 22 HTTP::Request::Common::PUT('', 'Content', 'ARRAY +(0x32113f4)') called at C:/Dwimperl/perl/site/lib/WWW/ line 439 WWW::Mechanize::_SUPER_put('WWW::Mechanize=HASH(0x30a72bc)', '', 'Content', 'ARRAY(0x32113f4)') called at C:/Dwimperl/perl/site/lib/WWW/ line 430 WWW::Mechanize::put('WWW::Mechanize=HASH(0x30a72bc)', 'http://someURL. +com/...', 'Content', 'ARRAY(0x32113f4)') called at line 110 Utils::Words_multipart('Utils=HASH(0x30a49b4)') called at multipart_1. +pm line 138 Press any key to continue . . .

Please guide

In reply to Re^2: PUT a Multipart request in PERL by xpert
in thread PUT a Multipart request in PERL by xpert

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (3)
    As of 2020-11-27 03:53 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found