in reply to Re^2: How to add column into array from delimited tab file
in thread How to add column into array from delimited tab file

Ok. when I put the $row into arrays, it doesn't print out anything?
for my $row (@aoa[1..$#aoa]) { @ID = $row->[0]; @data = $row->[1..$#aoa]; } print $OUT1 "$_\n" for @ID; print $OUT2 "$_\n" for @data;
the reason for array is so that I can calculate each value over the respective value in same array in a loop.

Replies are listed 'Best First'.
Re^4: How to add column into array from delimited tab file
by NetWallah (Canon) on Feb 17, 2014 at 08:59 UTC
    I'm not clear on what or how you want to calculate - it seems that you want to get a single column out into an array - so - for example, if you wanted to get all dataR1, you could do:
    my @dataR1 = map { $_->[1] } @aoa[1..$#aoa]; #Loop over each DatR1: for my $dr1 (@dataR1){ # Calculate something using $dr1 }

            What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
                  -Larry Wall, 1992