The stupid question is the question not asked | |
PerlMonks |
Re^4: What's so bad about &function(...)?by jdporter (Paladin) |
on Dec 07, 2005 at 22:50 UTC ( [id://515065]=note: print w/replies, xml ) | Need Help?? |
@{[@foo]} is really wrong, for the obvious reason that it copies the contents of @foo into a new (anonymous) array, so that, for example, splice( @{[@foo]}, 0, 5 ) does not modify @foo. But why is @{\@foo} wrong? Whatever the answer is, the same could be said of &foo() (aside from the extremely tiny overhead of taking and dereffing a ref).
We're building the house of the future together.
In Section
Meditations
|
|