In older versions of Perl the @output will be created whether you give it a name like: @output or not.
Wrong. It doesn't now, and it never did. What it did was push a collection of SVs on an internal stack. But it didn't package that list into an array structure. And don't confuse what happens in the implementation with what happens on the language level.
I understand this has been fixed as of 5.10.
Off by more than 4 years. The bug was fixed1 as of 5.8.1, which was released in Sep 2003. Oh, and BTW, 5.10 is over 2 years old - can we please stop treating 5.10 as something new and scary? Jesse is gearing up to release 5.12-RC0 very soon.

1The fix turned out to be a one line patch. Can you imagine, for years people tried to let programmers dance to the drum of language (quite opposite of what Perl is supposed to be), while the fix was rather trivial. And now, 6.5 years down the road, people still use the argument to argue against a map in void context.2

2I think only people that always use the return value of print are allowed to whine about a map used in void context.


In reply to Re^4: Possible useless use of map by JavaFan
in thread Possible useless use of map by andreas1234567

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.