in reply to Matrix Declaration / Data Structure Syntax Question

G'day oxirane,

Welcome to the monastery.

When presented with a complex data structure, you may find Data::Dumper to be a useful tool.

Here's a simplified version of your matrix:

$ perl -Mstrict -Mwarnings -e ' use Data::Dumper; my @matrix; for my $i (0 .. 1) { for my $j (0 .. 1) { $matrix[$i][$j]{row} = $i; $matrix[$i][$j]{col} = $j; } } print Dumper \@matrix; ' $VAR1 = [ [ { 'col' => 0, 'row' => 0 }, { 'col' => 1, 'row' => 0 } ], [ { 'col' => 0, 'row' => 1 }, { 'col' => 1, 'row' => 1 } ] ];

-- Ken