[ale] Perl question on Arrays

Eric Anderson eric at afaik.us
Fri Jun 11 15:34:27 EDT 2004


Josh Freeman wrote:
> I have two arrays that are both two dimensional. I assign
> @foo=[some][multidimensional][array];
> 
> $bar[x][y]= @foo;
> 
> Try as I might, I can't find a way go get @foo out of the the @bar
> array.   Is there an easy way to do this in Perl, or am i going up the
> wrong creek?

I'm a little rusty on my Perl but don't you have to turn that @foo array 
into a reference? An array can only store a scalar right? So...

$bar[x][y] = \@foo;

Eric



More information about the Ale mailing list