foreach (@list3) { $_ = 20; } # oder @list1 = map { s/([^aeiou])/$1b$1/ig } @list2;