Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Care to explain ++@h{@a,@b,@c,@d}; ?

by BrowserUk (Patriarch)
on Apr 28, 2003 at 20:17 UTC ( [id://253822]=note: print w/replies, xml ) Need Help??


in reply to Care to explain ++@h{@a,@b,@c,@d}; ?
in thread Find unique elements from multiple arrays

I was part way through a long-winded explaination when the latest episode of Enterprise came on. In the meantime the other respondants have explained it much better than I was.

The only addition I would make is that the ++ serves only one purpose, that of inhibiting the "Useless use of hash slice in void context" warning message that results were it not there. I agree with Aristotle that assigning an empty list is a much clearer way of acheiving this, and is the way I will do this in future.

An added bonus is that for anything other than the smallest datasets, it is slightly more efficient.


Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.
  • Comment on Re: Care to explain ++@h{@a,@b,@c,@d}; ?

Log In?
Username:
Password:

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

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

    No recent polls found