in reply to Re^2: dynamic 2d array
in thread dynamic 2d array

As you have it, the scope of the my @d_array does not include your sub printRow. Move the sub declaration to the end, or move the my declaration to the top.

Also, you probably want to be passing array refereces to Dumper (or at least be aware of the different output in the two cases):

use strict; use warnings; use Data::Dumper; my @ar = qw( a b c ); print Dumper(\@ar); print Dumper(@ar); __END__ $VAR1 = [ 'a', 'b', 'c' ]; $VAR1 = 'a'; $VAR2 = 'b'; $VAR3 = 'c';