in reply to Multidimensional Array Trouble
The first thing to do with complex data structures is to print them out with use Data::Dumper; print Dumper $mysteriousStructure;
The symptom of getting the same thing on two branches is often a problem of storing multiple references to the same old array or hash.
my @array; my %hash; push @array, 'foo'; $hash{ref1} = \@array; push @array, 'bar'; $hash{ref2} = \@array;
At that point, both entries in the hash point to the same array, and that array contains both 'foo' and 'bar'.
|
|---|