Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Coordinate validator

by FreeBeerReekingMonk (Deacon)
on Jun 10, 2019 at 13:03 UTC ( #11101197=note: print w/replies, xml ) Need Help??


in reply to Coordinate validator

I like the comma_count solution, you checked all bordercases. Maybe offer a perlgolf competition on this code :)

Particularly this code ($comma_count==3): s/(,)/!--$n ? '.' : $1/ge;

I liked that approach.

Found a bug though. This one is successful, but gives a bad coordinate back:

47 58.8300, -116 33,5160

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2019-10-22 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?