$->( @{ \@args } );
| [reply] [d/l] |
bracket happy? :)
$->( @{ \@args } );
No, actually... by saying @{ \@list }, you're just referrencing and dereferrencing the same list. In order to make an inline copy of the list, you'd need to add back in there a second, new (anonymous) array.
[me@host]$ perl -le 'sub foo { $_[0]++ } @x = (0,1); foo(@x); print "@
+x"'
1 1
[me@host]$ perl -le 'sub foo { $_[0]++ } @x = (0,1); foo(@{ \@x }); pr
+int "@x"'
1 1
[me@host]$ perl -le 'sub foo { $_[0]++ } @x = (0,1); foo(@{[ @x ]}); p
+rint "@x"'
0 1
[me@host]$
Please... if you're going to "correct" someone, then make sure that you are correct and that (s)he is incorrect.
------------
:Wq
Not an editor command: Wq
| [reply] [d/l] [select] |