in reply to Extracting coordinates

If you suspect a problem with the regex, the first thing I would do is get rid of the g modifier. I'm not saying it will solve your problem, but it does seem out of place. Also, Tip #9 from the Basic debugging checklist recommends using YAPE::Regex::Explain to demystify regular expressions.

If you could re-create your problem with some self-contained code and data, it would be something we could run. As it stands, you are reading in multiple files which we do not have access to.

Here are some other things that look suspicious to me:

Also, I recommend commenting out use diagnostics; when you are done debugging.