in reply to Two dimensional array problem
> How do I correctly set up and reference this array?
If I was you I'd rather use an array reference. There is no need to do this, but it feels more appropriate. Your array could look like this:
my $array_ref = [ [ 123, 456 ], [ 234, 567 ], [ 345, 678 ] ];
This array reference can be used in a variety of ways, but the most obvious are these:
my $pos = $array_ref->[$x][$y]; my $row = $array_ref->[$x]; my $column = $row->[$y];
Regards,
-octo
|
|---|