in reply to How can i take a file loaded into an array and split it up into different...
now you have an array, @bigarray, where each element is a reference to an array containing all the stuff from one line. To access the inner arrays use syntax like this:# @lines is from the file my @bigarray; #the output array foreach (@lines) { my @temp = split ':', $_; push @bigarray, \@temp; }
the brackets are sometimes unnecessary but I recommend leaving them in for clarity.@{$bigarray[0]}; #access the first inner array ${$bigarray[2]}[3]; #access element 2,3
|
|---|