All three version produce a GET request.

Some searching revealed

The post data specified by PostData is passed as a SAFEARRAY Data Type structure. The VARIANT should be of type VT_ARRAY and point to a SAFEARRAY Data Type. The SAFEARRAY Data Type should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.

Armed with that knowledge, I tried

$IE->Navigate("http://...", undef, undef, [ ord('A'), ord('='), ord('B +') ]);

Yay! It produced a POST request! Unforunately, the data is kinda weird. I get the following 48 bytes of data (shown in hex).

03 00 00 00 00 00 00 00 41 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 3D 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 42 00 00 00 00 00 00 00

In python, the solution is to use buffer("...post data...") as the argument, but I don't know the Perl equivalent.

This page provides a workaround.

I wish I could solve this (using Win32::OLE::Variant?), but I need to go. I'll try tomorrow. [ Bingo! See my followup for details. ]


In reply to Re: Win32::OLE VBA to Perl Translation Question about Internet Explorer (work) by ikegami
in thread Win32::OLE VBA to Perl Translation Question about Internet Explorer by sailortailorson

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.