I only just caught up on this thread, and noticed the post above saying that & is VB for string concatenation.

I was not aware of this and took & to be bitwise AND. The pretty much renders the Math::BigInt stuff I showed in my previous post not just wrong but greviously so. For this I apologise. My only defense is that I did say that I knew little about VB.

By way of recompence for misdirecting you I have an observation and a recommendation that may or may not help, but that should be sufficiently quick to try that it won't matter too much if they don't pan out.

As & means concatenate then the result of

strItemGUID = "{0420060000000000C000000000000046}" ptag_EMAIL_ADDRESS = "0x8083" strTemp = strItemGUID & ptag_EMAIL_ADDRESS print strTemp ' Is that the VB syntax for print?

ought to be the value that you need to pass. So, if you have the ability to run that under VB, you should then see what it is that you are trying to achieve.

My best guess is that you will either get

{0420060000000000C000000000000046}0x8083

or {0420060000000000C000000000000046}32899

I suspect the former is more likely, but if VB interprets the contents of a string as a number and then converted it back to (decimal) ascii representation, it is conceivable that the latter could be the result. In any case, once you print the result of the expression you will (should?) know one way or the other (or the third way I haven't conceived of:). And once you know what you are aiming to produce, it should be relatively simple to reproduce it in perl.

I truely hope that this helps and will make up for my earlier misinterpretation.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller



In reply to Re: Re: From VB to Perl by BrowserUk
in thread From VB to Perl by ChrisR

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.