Mapping substitutions
I am always wondering what is the best procedure to perform a substitution on a set of elements. While map could be a good idea,
@foo = map { s/bar/foo/g; $_ } @baris not legible. Probably better to use
@foo = @bar; s/bar/foo/g for @foo;While I understand that the substitute operator return value is useful and relevant, I wonder if there is a cleaner syntax for this behavior with map.