develooper Front page | perl.perl5.porters | Postings from August 2008

Re: Wrong RE match in 5.10.0

Thread Previous | Thread Next
From:
Gisle Aas
Date:
August 24, 2008 02:30
Subject:
Re: Wrong RE match in 5.10.0
Message ID:
87227DBA-5982-4FB7-89B4-E71E6A8E40FE@activestate.com
On Aug 23, 2008, at 16:18, Abigail wrote:

>>
>> Reducded the example a bit more to make it more obvious (I was  
>> initially
>> confused by what you were saying):
>>
>> #!perl
>>
>> $str = "x" x (1024 * 100);
>> if ($str =~ /^(.)(\1*)\z/) {
>>   print "$1 ", length($2), "\n";
>> }
>> else {
>>   print "no match\n";
>> }
>> __END__
>>
>> perl-blead prints 'no match' which is unexpected since logically
>> speaking the regex matches the input.
>
>
> But if you turn on warnings, it's less unexpected, as Perl does warn:
>
>     Complex regular subexpression recursion limit (32766) exceeded

What I'm saying is that it would be preferable if this was a die  
instead of a warn.

--Gisle


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About