in reply to Re: Re: Getting different anonymous arrays
in thread Getting different anonymous arrays

I just thought it was weird that the anonymous array was definded as the value of the hash key 'c' and all the rest of the hash keys have a value of its reference. It seems to me that the hash key 'a' would have been defined first and the other keys would have the value of its reference. I guess it doesn't matter -- they all point to the same anonymous array reference.

I see what happens. if I add this line to my original program:

print join ",", keys %array;
I get an output of:
c,a,b,d
So Data::Dumper must just take the first key it gets from keys point it to the anonymous array reference and then have the rest of the keys point to it. That makes sense. You learn something new every day.

--

flounder