in reply to
Re: Think for yourself.
in thread is the use of map in a void context deprecated ?
IMO the winner is
++$_ for @array;
which reads more naturally than either of your propositions. (Although between the two of yours, I'd prefer the map as well.)
But where is this notion coming from? "map" as an operation that maps a function over all the elements of a list doesn't come from Perl (I've been familiar with the operation and the name even before Larry released Perl 1.000), and its name doesn't suggest anything about return values shall be used.
That's you. Most people don't have such a background. For the majority of Perl programmers it is the first list oriented language they have encountered. So maybe it would be more appropriate to say that you
already had a preconception that map in void context is fine, which other people don't
come with. It certainly explains why you regard map in void context as a completely normal construct and find the opposition to it exasperating.
Makeshifts last the longest.