ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
This should then provide a list of the long/lat values found in the data, and then have an "array" for each of them (even if there is 1 item, or more than 1 with the same long lat values)if (length $link->{LatitudLongitud} > 5) { if (!$seen->{$link->{LatitudLongitud}}) { push @{$GoogleMaps::records->{$link->{LatitudLongitud} +}}, $link; $seen->{$link->{LatitudLongitud}} = 1; # make sure we +set this, so we know its been seen already! } else { push @{$GoogleMaps::records->{$link->{LatitudLongitud} +}}, $link; } } if (length $link->{LatitudLongitud02} > 5 && $link->{LatitudLo +ngitud} ne $link->{LatitudLongitud02}) { if (!$seen->{$link->{LatitudLongitud02}}) { push @{$GoogleMaps::records->{$link->{LatitudLongitud0 +2}}}, $link; $seen->{$link->{LatitudLongitud02}} = 1; # make sure w +e set this, so we know its been seen already! } else { push @{$GoogleMaps::records->{$link->{LatitudLongitud0 +2}}}, $link; } }
'13.709931,-89.202365' => [ $VAR1->{'13.704011,-89.247029'}[ +0] ], '13.687479,-89.221301' => [ { 'isPopular' => 'No', 'Curri_Desc18' => '', 'ExpiryNotify' => '0' } ], '13.699487,-89.231086' => [ { 'isPopular' => 'No', 'Curri_Desc18' => '', 'ExpiryNotify' => '0' } ],
Anyone got any suggestions as to whats going on here? I'm at a dead end, and have been trying to work this out for ages now (trying different approaches, etc) ... but nothing seems to be workingif (length $link->{LatitudLongitud02} > 5 && $link->{LatitudLo +ngitud} ne $link->{LatitudLongitud02}) { if (!$seen->{$link->{LatitudLongitud02}}) { push @{$GoogleMaps::records->{$link->{LatitudLongitud0 +2}}}, "FOO"; $seen->{$link->{LatitudLongitud02}} = 1; # make sure w +e set this, so we know its been seen already! } else { push @{$GoogleMaps::records->{$link->{LatitudLongitud0 +2}}}, "FOO"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Weirdness with pushing records, and values saved
by roboticus (Chancellor) on Feb 13, 2011 at 19:02 UTC | |
by ultranerds (Hermit) on Feb 13, 2011 at 20:11 UTC |