in reply to Re: Re: Re: Passing Array of Arrays
in thread Passing Array of Arrays
When you build an AoA, you're just building an array, who's values are references to other arrays. So while you write:
You're actually creating 3 arrays, and put in @a references to the other two.@a = ( [ qw/1 2 3/ ], [ qw/a b c/ ] );
So when you pass that to a sub, it's passed as a simple list - but the members of the list are still the references to your two arrays, and perl doesn't really care if they're scalars or references - there's no automatic-recursive-dereferencing going on...
Does that help at all?
-- zigdon
|
|---|