# @lines is from the file my @bigarray; #the output array foreach (@lines) { my @temp = split ':', $_; push @bigarray, \@temp; }