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

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

Hi Monks :) I'm working with a CSV file with large dimensions (1100~rows, 60~ columns). I want to split the list of 1100~ using the information present in one of the columns. To do this, I've copied the contents into a multi-dimensional array. However, when I try to access  $Arr[0][0], there is no output.  $Arr[0], it shows me the first row of the array. I want to approach the array-column wise, and I'm not sure what changes to make. This is the code I am using to read the csv file in question :

#!/usr/bin/perl-w my @list = <*.csv>; my $elem; foreach $elem (@list) { open (FILE, $elem) or die "Cannot find $elem!\n"; my @array = <FILE>; close FILE; }
Here are a couple of rows from the file:
organism O2_REQUIREMENT Domain Classification a.acidocaldarius Aerobe BACTERIA FIRMICUTES a.actinomycetemcomitans Facultative BACTERIA PROTEO
To clarify : $array[0][0] should give "organism" but I get no output. $array[0] gives "organism O2_REQUIREMENT Domain Classification"