Ok then, I don't think there's a whole lot you can do to improve a script this simple. There are some other places where you can put long concatenations into single double-quoted strings like I showed before, which (in my opinion, anyway) is clearer. You might also add some error checking to your DBI executes, dying/warning with $DBI::errstr if something goes wrong.
On the subject of efficiency: in my experience, when you're fetching data from sites across the net, your script will almost always spend most of its time waiting for that data. Unless your database server is particularly overworked, your database lookup and updates won't take much time, so while there may be things you could do to speed them up (like indexes), it probably wouldn't affect the overall speed of your script significantly. If the API fetches can be sped up, that would have to be done within the module, not your script. You could speed things by forking/threading to do multiple fetches at once, but that might violate the API's rules.
So for the most part, I'd say your script is fine. I'd make some style changes, but those are fairly subjective, and I doubt much can be done regarding efficiency.
Aaron B.
Available for small or large Perl jobs; see my home node.
In reply to Re^3: Google MapsAPI
by aaron_baugher
in thread Google MapsAPI
by drodinthe559
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |