[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Add to elements of a list



Peter Scott wrote:
> 
> At 02:02 PM 4/8/00 -0600, Nathan Torkington wrote:
> >
> >   &{sub { while(@_) { ${+shift} += pop } }}(\$z, \$y, \$x, foo())
> 
> There, that's the spirit :-)  Golf, anyone?

Here's one more way that violates the temp variable restriction:

    ${\($x, $y, $z)[$i++]} += $_ for foo;

-- 
Rick Delaney
rick.delaney@home.com

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe