Perl Monks,

I am blessed/cursed with being in a M$ environment for a particular project. I am using Perl to automate a terminal emulator that accesses a legacy system. The host system is a 3270 mainframe. My terminal emulator is SmarTerm (ST) by Esker.

The ST macro language and OLE objects are very rich, which is why I chose this piece of software. I was initially doing this work in VB6 but I scrapped that the moment I heard of Win32::OLE!

Here's my problem: the ST objects have a number of properties that are set as lvalues. For example, there is a timeout setting, the number of seconds that the program will sit and wait for one or more strings to be sent by the host. In VB6 you'd code it like this:

st.StringWait = 20 ' set timeout to 20 seconds ' Where 'st' the SmarTerm session object
"StringWait" is a property of the ST object. As you can see, it is on the left side of the = sign. In Perl you can't do this:
$st->StringWait = 20; # lvalue error! # Where '$st' is the SmarTerm session object
I've already tried this, just for kicks:
$st->StringWait(20); # compiles ok but no effect

Is there a Perl way of interfacing with these OLE objects that are traditionally set by using an lvalue?

Your insights and comments are welcomed and appreciated!

-MC

In reply to Win32::OLE and lvalue issue by mercutio_viz

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.