I can't reproduce your problem with ActivePerl 5.6.1 build 635, but I can reproduce it with ActivePerl 5.6.0 build 623

>c:\progs\perl588\bin\perl 730963.pl Line has 6 words. 'This is some space separated text' 2 3 4 5 - This-is-some-space-separated-text Line has 4 words. 'On three different lines' 17 22 21 - On-three-different-lines Line has 6 words. 'So you can see what happens' 2 3 4 5 - So-you-can-see-what-happens >c:\progs\perl561\bin\perl 730963.pl Line has 6 words. 'This is some space separated text' 2 3 4 5 - This-is-some-space-separated-text Line has 4 words. 'On three different lines' 17 22 21 - On-three-different-lines Line has 6 words. 'So you can see what happens' 2 3 4 5 - So-you-can-see-what-happens >c:\progs\perl560\bin\perl 730963.pl Line has 6 words. 'This is some space separated text' Argument "1," isn't numeric in numeric eq (==) at !.pl line 25. Argument "2," isn't numeric in numeric eq (==) at !.pl line 25. Argument "3," isn't numeric in numeric eq (==) at !.pl line 25. Argument "4," isn't numeric in numeric eq (==) at !.pl line 25. Argument "5," isn't numeric in numeric eq (==) at !.pl line 25. Argument "6," isn't numeric in numeric eq (==) at !.pl line 25. 2, 3, 4, 5 - This-is-some-space-separated-text Line has 4 words. 'On three different lines' Argument "1," isn't numeric in numeric eq (==) at !.pl line 25. Argument "2," isn't numeric in numeric eq (==) at !.pl line 25. Argument "3," isn't numeric in numeric eq (==) at !.pl line 25. Argument "4," isn't numeric in numeric eq (==) at !.pl line 25. 17, 22, 21 - Argument "5," isn't numeric in numeric eq (==) at !.pl li +ne 25. Argument "6," isn't numeric in numeric eq (==) at !.pl line 25. On-three-different-lines Line has 6 words. 'So you can see what happens' Argument "1," isn't numeric in numeric eq (==) at !.pl line 25. Argument "2," isn't numeric in numeric eq (==) at !.pl line 25. Argument "3," isn't numeric in numeric eq (==) at !.pl line 25. Argument "4," isn't numeric in numeric eq (==) at !.pl line 25. Argument "5," isn't numeric in numeric eq (==) at !.pl line 25. Argument "6," isn't numeric in numeric eq (==) at !.pl line 25. 2, 3, 4, 5 - So-you-can-see-what-happens

The only workaround I've found is to change
my $regexp_p = qr/$PatternCore/;
to
my $regexp_p = $PatternCore;

And if you really want to have fun:
Try changing my $Regexp_ref;
To: our $Regexp_ref;

You mean $regexp_p? No change. my $regexp_p, our $regexp_p and local our $regexp_p all produced the same result.


In reply to Re^5: qr bug in perl 5.6.1 with lexicals by ikegami
in thread qr bug in perl 5.6.1 with lexicals by Anonymous Monk

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.