in reply to Re: array reference madness
in thread array reference madness
Indeed; the extra referencing is being added by the \&buildlist($_), which is an unnecessary complication. There's no need to build a reference here at all, since buildlist() already explicitly returns one, and it's arguably confusing because \& is normally used to take a reference to a subroutine, not to a return value.
Removing the \& there would enable all the ${$$...}-type constructions to be simplified, so for example the assignment to @tmp would then become just @{$ref->[3]}. This is probably a Good Thing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: array reference madness
by Anonymous Monk on Mar 14, 2009 at 22:42 UTC | |
by Anonymous Monk on Mar 15, 2009 at 07:03 UTC |