while(){ chomp; push @data, split(/,/,$_); } #### my @data = (); while(){ chomp; push @data, [ split(/,/,$_) ]; } #### print data[0][0]; # prints the first element of the first line print data[4][3]; # prints the fifth element of the fourth line