Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Columns in double dimension array

by torres09 (Acolyte)
on Jul 17, 2013 at 08:21 UTC ( [id://1044753]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1044753]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found