my @array = <FILE>; stores the lines of your file in the array. They still need to be split into columns:
use strict; use warnings; use Data::Dumper; my @array = <DATA>; # now contains the rows print Dumper(\@array); $array[$_] = [ split /\s+/, $array[$_] ] for 0..$#array; # split lines + into columns print Dumper(\@array); print $array[0][0]; # does not look like CSV... __DATA__ organism O2_REQUIREMENT Domain Classification a.acidocaldarius Aerobe BACTERIA FIRMICUTES a.actinomycetemcomitans Facultative BACTERIA PROTEO
In reply to Re: Accessing cells in CSV files
by hdb
in thread Accessing cells in CSV files
by newbie1991
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |