[32964] in Perl-Users-Digest
Perl-Users Digest, Issue: 4240 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 24 21:09:17 2014
Date: Tue, 24 Jun 2014 18:09:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 24 Jun 2014 Volume: 11 Number: 4240
Today's topics:
Complex regular subexpression recursion limit <*@eli.users.panix.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 25 Jun 2014 00:48:58 +0000 (UTC)
From: Eli the Bearded <*@eli.users.panix.com>
Subject: Complex regular subexpression recursion limit
Message-Id: <eli$1406242042@qz.little-neck.ny.us>
Maybe I'm tired, but I'm not seeing why I'm triggering this warning on
this code with this input.
#!/usr/local/bin/perl5.14.2
use warnings;
use strict;
# flush after each print so that error appears in right context
# when run with STDIN and STDERR mixed.
$| ++;
my $hold = <<'END_BLOCK';
This opportunity, therefore, ought not to be allowed to pass for letting
Italy at last see her liberator appear. Nor can one express the love
with which he would be received in all those provinces which have
suffered so much from these foreign scourings, with what thirst for
revenge, with what stubborn faith, with what devotion, with what tears.
What door would be closed to him? Who would refuse obedience to him?
What envy would hinder him? What Italian would refuse him homage? To all
of us this barbarous dominion stinks. Let, therefore, your illustrious
house take up this charge with that courage and hope with which all
just enterprises are undertaken, so that under its standard our native
country may be ennobled, and under its auspices may be verified that
saying of Petrarch:
END_BLOCK
# first eat all 'strict' sentences
while($hold =~ s/^(
(?: [^.!?]+ # non-ending characters
| [.!?]+[,\w-] # ending charters in non-ending
# context
)+
[.!?]+['"\(\)\[\]{}*]* # ending characters in ending
\s # context
)//x) {
my $a = $1;
$a =~ s/^\s+//;
$a =~ s/\s+$//;
$a =~ s/\s+/ /g;
print "$a\n";
}
# whatever is left is a loose sentence.
$hold =~ s/^\s+//;
$hold =~ s/\s+$//;
$hold =~ s/\s+/ /g;
print "\n\n$hold\n";
__END__
:r! /usr/local/bin/perl5.14.2 -x % 2>&1
This opportunity, therefore, ought not to be allowed to pass for letting Italy at last see her liberator appear.
Nor can one express the love with which he would be received in all those provinces which have suffered so much from these foreign scourings, with what thirst for revenge, with what stubborn faith, with what devotion, with what tears.
What door would be closed to him?
Who would refuse obedience to him?
What envy would hinder him?
What Italian would refuse him homage?
To all of us this barbarous dominion stinks.
Complex regular subexpression recursion limit (32766) exceeded at .article.19396 line 40.
Let, therefore, your illustrious house take up this charge with that courage and hope with which all just enterprises are undertaken, so that under its standard our native country may be ennobled, and under its auspices may be verified that saying of Petrarch:
Elijah
------
it's a quote from _The Prince_ by Machiavelli
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 4240
***************************************