Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: substr out of str error - but why?

by BillKSmith (Monsignor)
on Jun 18, 2022 at 19:56 UTC ( [id://11144845]=note: print w/replies, xml ) Need Help??


in reply to substr out of str error - but why?

Your code has processed several iterations correctly. The error message suggests that the next 'end' is beyond the end of the string. Are you sure that you are printing the range before you try to use it? Try printing your debug messages to STDERR. There must be either an error in your data or a special case that you are not considering. Use your editor to search for the last 'good' end. Parse the next few records by hand. If you cannot find the problem, you can write and post a simple program that demonstrates the problem with these offending records.
Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-28 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found