in reply to Re: Match operator fails for elements 100 and higher
in thread Match operator fails for elements 100 and higher

I found a work-around, just use a different array to index the string array instead of using numbers:
my @mystrings = ("string") x 200; my @i = 0..$#mystrings; m/$mystrings[$i[100]]/;
Thanks for your help. Should I report this issue?

Replies are listed 'Best First'.
Re^3: Match operator fails for elements 100 and higher
by Crackers2 (Parson) on Nov 03, 2010 at 21:17 UTC

    Simpler workaround (or maybe it's the right thing to do in the first place) is this:

    m/${mystrings[100]}/;
      Yup, there is ambiguity as to whether the [999] is a character class or array index.

      Odd that the contents should determine how it's parsed though.

      print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."