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?? |
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.
In Section
Seekers of Perl Wisdom
|
|