Interestingly, things start working again at 999. i.e.
m/$mystrings[998]/; # Fails m/$mystrings[999]/; # Works m/$mystrings[1000]/; # Works
Deparse shows it's indeed parsed differently, but doesn't show why:
> perl -MO=Deparse x Global symbol "$mystrings" requires explicit package name at x line 10 +. x had compilation errors. use strict 'refs'; my(@mystrings) = 'string' x 200; $mystrings[99]; "$mystrings[100]"; /$mystrings[999]/; /${'mystrings'}[998]/;

Update: These values also work: 111, 222, 333, 444, 555, 666, 777, 888. And apparently above 1000 it's not simple either. The first working ones after 1000 are: 1110, 1111, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1131, 1141, 1151, 1161, 1171, 1181, 1191, 1311, 1333, 1411

Overall, there's 393 values from 0 to 10,000 for which it works. The rest fail.


In reply to Re: Match operator fails for elements 100 and higher by Crackers2
in thread Match operator fails for elements 100 and higher by thrasher

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.