Thanks for pointing that out.
I'll be darned. I need to check some of my scripts
for this error.
I'm not sure what I was trying to do with that.
Probably eliminate very small files.
$text is a read from a PDF file:
This is what I wrote a long time ago:
eval {
($text = $pdf->getPageText($page));
};
if ($@) {
print "$date | Skipping $filename since it won't parse\n\n";
print OUT "$date | Skipping $filename since it won't parse\n\n"
unless exists $log{$filename};
goto SKIP;
}
$text = "" unless defined $text;
unless ($text =~ /[a-zA-Z]{,10}/s) {
undef @lines;
undef $texttemp;
goto SKIP;
}
Because of this error I think all PDF files are
eliminated from consideration, which is not a
huge problem, but is not intended.
Without doing a whole lot of thinking, I think I
may change that one line to:
unless ($text =~ /[a-zA-Z\s]{10,}/s) {
Thanks for the response.
Mike
On 11/23/2017 8:31 AM, X Dungeness wrote:
Hm, that's a misbegotten quantifier.
From 5.26.0 perlreref:
There is no quantifier "{,n}". That's interpreted as a literal string.
On Thu, Nov 23, 2017 at 3:04 AM, Mike Flannigan <mikef...@att.net
<mailto:mikef...@att.net>> wrote:
I recently installed the latest version of
Strawberry Perl. My scripts were developed
in ActiveState Perl.
I have a line:
unless ($text =~ /[a-zA-Z]{,10}/s) {
When I run the script that line is in I get:
Unescaped left brace in regex is deprecated here
(and will be fatal in Perl 5.30), passed through in
regex; marked by <-- HERE in m/[a-zA-Z]{ <-- HERE ,10}/
at htmlpost.pl <http://htmlpost.pl> line 316.
I see this:
http://www.perlmonks.org/?node_id=1104517
<http://www.perlmonks.org/?node_id=1104517>
I also see that escaping it with my ActiveState Perl
messes up it's function entirely, but still allows it
to run with no errors so I say this is a huge
problem. Seems like the migration to Perl 5.30 is going to
be interesting to say the least.
Anybody have any other comments about this?
Mike Flannigan
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
<mailto:beginners-unsubscr...@perl.org>
For additional commands, e-mail: beginners-h...@perl.org
<mailto:beginners-h...@perl.org>
http://learn.perl.org/