It'd be nice if you would have posted the error message. I assume you mean the error below. Trying this under 5.6.0, changing the quotes to keep the $ and the ! from my shell I get:
Perl v49.0.4294967295 required--this is only v5.6.0
And this isn't too hard to figure out.

The syntax "do(5.7)" essentially does the same thing as "require(5.7)" which causes perl to ensure that the version of the interpreter is at least 5.7. That's where the "required" message comes from. What about that number?

vstrings: they're buggy nasty little creatures that should have been squished when first proposed for Perl 5. Nontheless, we've got them and in certain corners of perl the implementation is less than stellar.

If we agree to that, where'd the number come from? Well, try this:

perl -e 'print ~1'
Okay, the string I get is 4294967294. That's part of the version string that prints out. What I suspect is that the !$var is getting 1-complemented into this string, do's trying to use that as a version number, and the vstring implementation has decided that it's really version 49.0.429... for display purposes. There's probably some odd conversion in there to get 49.0 out of that number.

update: The "49" comes from 1 being ASCII 49. The 429... from the 1's complement. The 0? The arrangement? Still a mystery. And since vstrings and do are involved, should probably remain that way.


In reply to Re: do() oddity by clintp
in thread do() oddity by earthboundmisfit

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.