#@level is an array of strings; each string is a row of the map. # This breaks the entire thing into a 2D array where each element is a character on the map. my @tempArray; my @twoDee; for(my $m = 0; $m <= $#level; $m++) { @tempArray = split(//, $level[$m]); push @twoDee, [@tempArray]; }