in reply to AoA Selective Element Substitution

Using regexps in a map gets messy, so generally you don't want to do that.

The following code changes the contents of $array (replacing your map line):

for ( @$array ) { $_->[0] = $test if $_->[0] =~ m/\D/; }

As a one liner, if that's important to you:

$_->[0] =~ m/\D/ and $_->[0] = $test for @$array;