Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: way of declare an integer variable instead use /^\d+$/

by BillKSmith (Monsignor)
on May 26, 2024 at 19:49 UTC ( [id://11159678]=note: print w/replies, xml ) Need Help??


in reply to Re^2: way of declare an integer variable instead use /^\d+$/
in thread way of declare an integer variable instead use /^\d+$/

It probably does not matter if the O/0 error is in the original .pdf file or if the OCR misreads it. The tr operator (refer tr/SEARCHLIST/REPLACEMENTLIST/cdsr) directly corrects the problem. Your test for a reasonable value is probably a good idea, but it really has nothing to do with the O/0 problem.
my ($text, $page) = split "\t", $line; $page =~ tr/O/0/ and warn "Replaced 'O' with '0' in page $page";
Bill

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11159678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2026-04-11 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.