in reply to Missing values when running code.

I suspect your requests were intermittently dropped, as such would account for the "random missing values."

Replies are listed 'Best First'.
Re^2: Missing values when running code.
by Anonymous Monk on Aug 14, 2012 at 14:29 UTC
    This is what I am taking about, is this related to the google API? Is there anything that can be done to avoid such "intermittently" drop on the requests?

      Yes, sorry: my first response wasn't too helpful. Replacing $tree = $tpp->parsehttp( GET => $url ); with the following consistently returned all cities:

      my $count = 5; $tree = $tpp->parsehttp( GET => $url ) while !defined $tree and $count +--;

      Using $count helps to insure the script's not forever caught in the while loop.

      Update: Modified the description and tweaked the $count routine.

        I like that, going to try, thanks for the help!