bob,100 maple st,1496570,AZ,3460702,yellow sue,2153 oak ave,1813820,HI,335802,green george,285 elm rd,156632,KY,397218,blue sally,113 plum st,144207,TX,305438,red rita,950 grove ct,2507570,OH,76427,orange #### #!/usr/bin/perl -w use strict; my @restore; my @testArray = getData("test.txt"); print $testArray[0][0],"\n"; print $testArray[$#testArray][0],"\nGot it!"; sub getData { my $fileOpen = $_[0]; my ($tempData,$tempHold,@listTemp,@listDetail,@listFinal); open (DataIN,$fileOpen) || die "Darn."; while() { $tempData = $_; $tempHold .= $tempData; } close DataIN; @listTemp = split(/\n/,$tempHold); for(my $i=0; $i<=$#listTemp; $i++) { @listDetail = @restore; @listDetail = split(/,/,$listTemp[$i]); for(my $j=0; $j<=$#listDetail; $j++) { $listFinal[$i][$j] = $listDetail[$j]; } } return @listFinal; }