in reply to A "harmless" alternative to 'map{}'?

Third alternative:
my $x; @out_list = map { ($x = $_) =~ s/foo(.*?)bar/$1 baz/; $x } @in_list;
Aliasing $_ to the input element is done for efficiency reasons. Note that it doesn't have to be $_ that the callback returns; you can modify the input list and at the same time generate a different output list from it. For a silly example, my @subst = map { s/\s+/_/g } @list; will turn any whitespace sequences in the input list elements into underscores and return a list that contains the number of substitutions effected for each element. Granted this example is silly, but on occasion this "dual output" behaviour can be very useful. In other cases you can copy $_ to protect it. Of course the "other cases" are more common so this is a violation of Huffman coding, but oh well..

Makeshifts last the longest.