Dear all, I am trying to make a matrix out of a file (row-columns) using perl. In particular I would like to print the first row of an array of arrays which contains the headings of the file. I tried to do it but I can't print it. If used $AoA[0], I get the reference to the array.How can I deference it? Thanks in advance, P
#! usr/local/bin/perl use warnings; use strict; my @AoA= (); open(IN,"genotypes_piece") || die "I can not open file\n"; my @temp =(); while (defined (my $line = <IN>)) { @temp = split/\s+/,$line; push(@AoA, [EMAIL PROTECTED]); } for (my $x = 11; $x <=$#temp; $x++) { for (my $y = 1; $y <= $#AoA ; $y ++) { print "At X=$x, Y=$y is", $AoA[$y][$x], "\n"; } }