..and then after that, looping through it with this:if (length $link->{LatitudLongitud} > 5) { if (!$seen->{$link->{LatitudLongitud}}) { push @{$records->{$link->{LatitudLongitud}}}, $link->{ +ID}; $seen->{$link->{LatitudLongitud}} = 1; # make sure we +set this, so we know its been seen already! } else { push @{$records->{$link->{LatitudLongitud}}}, $link->{ +ID}; } } if (length $link->{LatitudLongitud02} > 5 && $link->{LatitudLo +ngitud} ne $link->{LatitudLongitud02}) { if (!$seen->{$link->{LatitudLongitud02}}) { push @{$records->{$link->{LatitudLongitud02}}}, $link- +>{ID}; $seen->{$link->{LatitudLongitud02}} = 1; # make sure w +e set this, so we know its been seen already! } else { push @{$records->{$link->{LatitudLongitud02}}}, $link- +>{ID}; } } $links->{$link->{ID}} = $link;
..and that works like a charm :)map { my ($lat,$long) = split ",", $_; my @links = @{$records->{$_}}; my $box_contents; my @html_contents; my $num_links = $#links+1; foreach (@links) { my $link = $links->{$_}; # do stuff here } } keys %$seen;
In reply to Re^2: Weirdness with pushing records, and values saved
by ultranerds
in thread Weirdness with pushing records, and values saved
by ultranerds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |