http://www.perlmonks.org?node_id=1044753

torres09 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Columns in double dimension array
by kcott (Archbishop) on Jul 17, 2013 at 08:42 UTC

    G'day torres09,

    You asked about this less than 48 hours ago: indefinite number of columns

    You were provided with code for doing this and links to documentation explaining about this. How about you go back and read what's already been provided.

    If there was something you didn't understand, either in the code examples posted or the documentation linked to, then ask a specific question about that issue.

    -- Ken

Re: Columns in double dimension array
by Skeeve (Parson) on Jul 17, 2013 at 08:46 UTC

    I think, I don't understand the problem completely.

     $csv->getline($io) already returns a ref to an array where, each entry "n" is the cell of column "n+1".

    So this should already give you the correct array:

    while (my $row = $csv->getline($io)) { push @DD, $row; }

    $DD[$r][$c] should give you the entry in row "r+1" and column "c+1".


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
Re: Columns in double dimension array
by Anonymous Monk on Jul 17, 2013 at 08:49 UTC
Re: Columns in double dimension array
by mtmcc (Hermit) on Jul 17, 2013 at 08:57 UTC
    The documentation for array of arrays is here.

    Also, you could google it.

    I hope that helps.

    -Michael

Re: Columns in double dimension array
by BillKSmith (Monsignor) on Jul 17, 2013 at 13:37 UTC
    Strictly speaking, perl does not support double dimension arrays. It simulates them very well with arrays of references! The implication of this is that you cannot ignore the discussion of references in the doucmentation you have alread been given.
    Bill