If you really needed this, it could be done with a little syntactic sugar
something like
L($x,$y,$z) += L(1,2,3);
the trick would be to let L() ( for "list" ) return an object with overload ed operators (in scalar context) performing the side-effect
Tho I'm not sure if the RHS needs to be packed into an object too, but I assume += is imposing scalar context.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: A list assignment gotcha
by LanX
in thread Not understanding 2 sentences in perldoc
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |