in reply to Weirdness with pushing records, and values saved
Ok, what's the problem with it? The $VAR1->{'13.704011,-89.247029'}[0] is (if I understand correctly) simply Data::Dumper's way of telling you that the first item in the array referenced by $VAR1->{'13.709931,-89.202365'} is the same item as the first item in the array referenced by $VAR1->{'13.704011,-89.247029'}. For example:
$ cat 887880.pl #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $t1 = {a=>1, b=>2, c=>3}; my $t2 = {a=>2, b=>5, c=>7}; my %H = ( X=>$t1, Y=>$t1, Z=>$t2 ); $H{Y}{b}=11; print Dumper(\%H); $ perl 887880.pl $VAR1 = { 'Z' => { 'c' => 7, 'a' => 2, 'b' => 5 }, 'X' => { 'c' => 3, 'a' => 1, 'b' => 11 }, 'Y' => $VAR1->{'X'} }; $
If that's intended, then everything is fine. If it's not intended, then perhaps you're building $link incorrectly and re-using a hash, and overwriting your data as shown above. I can't see how you're building $link, nor how you're accessing the data, so I can't tell quite what your problem is.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Weirdness with pushing records, and values saved
by ultranerds (Hermit) on Feb 13, 2011 at 20:11 UTC |