Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Possible useless use of map

by JavaFan (Canon)
on Mar 20, 2010 at 12:41 UTC ( [id://829794]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Possible useless use of map
in thread Possible useless use of map

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://829794]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-26 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found