my $i = 0; #my @polea; #This was conflicting with the map initialization below my @poleb; my @polec; my $loop = 0; my $string = ""; #while ($numdisks > $loop++) { # $string = $string ."x"; # push (@polea, $string); #} my @polea = map 'x' x $_, 1 .. $numdisks; print "A\t\t\tB\t\t\tC\n"; for (my $len = 0 ;$len <= $numdisks; $len++) { # print "$polea[$len]\t\t\t$poleb[$len]\t\t\t$polec[$len]\n"; 32 print join "\t\t\t", map ($_->[$len] || ""), \$polea, \$poleb, \$polec; print "\n"; }