in reply to Multiple Transformations with "map"

I personally never liked map. for works just as well in almost all situations, and it's much easier to understand.
my @arr = ("A[TCG]GG 3", "CTG[AA] 4"); for (@arr) { s/ .*//; s/\[[ATCG]+\]/S/g; } print join "\n", @arr;