@new_list = map {s/foo/bar/} @old_list; #### @new_list = map {s/foo/bar/; $_} @old_list;