The sticking point that blocks a direct implementation of the type of solution you would best like is that Perl blesses references to turn them into what amount to objects. WordNet::QueryData->new() returns a blessed object and that blessed state is what is difficult to persist in the manner you wish.

There may be another solution though. Perl is pretty good at driving OLE. In fact VB can generally be translated to Perl without too much trouble (after a little experience anyway). If your VBA script doesn't need much UI then it may be possible to turn things inside out a little and drive Excel from Perl to get the work done. Win32::OLE is the place to start exploring this option.

Another way you may be able to go about it is to have Perl manipulate your Excel files directly. Again, there is a fair amount of support for that in CPAN.


Perl reduces RSI - it saves typing

In reply to Re: Absolute simplest way to keep a database variable persistent? by GrandFather
in thread Absolute simplest way to keep a database variable persistent? by natestraight

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.