in reply to Array of arrays - redux

An illustration to see whether I understand your problem: I create an array of array refs with 5 lines (instead of your 15 to keep it small) and 11 columns (0 to 10) called @lookback. Then I extract column number 3 (the fourth column) from this AoA, result called @column. Is that the right direction?

use strict; use warnings; use Data::Dumper; my @lookback; for my $line (1..5) { push @lookback, [ map { "$line.$_" } 0..10 ]; } print Dumper \@lookback; my $col = 3; my @column = map { $_->[$col] } @lookback; print Dumper \@column;

Replies are listed 'Best First'.
Re^2: Array of arrays - redux
by JockoHelios (Scribe) on Jun 17, 2013 at 17:37 UTC
    It's close, but I'm copying the rows into the look-back array. I don't see why it should make a difference, but it does.

    I can read the any selected field from the original array of arrays, but when I copy the rows into the look-back array I can't access any field in those rows.

    Should I be copyng references to those rows instead of copying the rows themselves ?
    Dyslexics Untie !!!