my @fields = qw/this is the_other/; @fields = grep { s/t/j/ } @fields; print "@fields"; # prints "jhis jhe_other" (losing "is")