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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |