my @sandGrid = map { chomp; [ split '', $_ ] } ; #### use Data::Dumper; ... print Dumper \@sandGrid;