in reply to dereferencing in a list context
perldoc perlop is almost clear on this:
Unary "\" creates a reference to whatever follows it. See perlreftut and perlref.
Read from right to left, the \ comes with the parentheses and is executed for all elements of the list. There is no array context here, hence no list flattening.
What you might have wanted can be accomplished like this:
@m = ( [ (@a, @b, @c) ] ); # or push @m, [ (@a, @b, @c) ];
Here, the list is flattened and a reference to a new nameless array is put into array @m.
Cheers, Sören
Update: Limbic~Region, I don't know what the OP actually wanted, I made my best guess. I feel it is hir turn to tell us =)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: dereferencing in a list context
by Limbic~Region (Chancellor) on Apr 07, 2004 at 11:41 UTC | |
by tye (Sage) on Apr 07, 2004 at 15:44 UTC |