in reply to Re: Join and append to last element?
in thread Join and append to last element?

Using map() just for side effects without good reason is often considered bad form. I'm sure my earlier suggestion is more efficient, but if you prefer using map(), I would do something like this:
my $result = join("", map("$_\n", @lines));