my @problems = many; foreach(@problems) { s/simple/easy/gi; s/hard/possible/gi; } @problems = solved;