Thank you Randal, for explaining that. I've never really understood
exactly how that worked before (3 years of perl programming too!).
While playing with test cases I came up with the following code
snippet that I figured I'd post as a thank you for your excellent
explanation.
#!/usr/bin/perl
$_ = 'utAnher Per Hkercalto sJ'; $_ = split //;@__=@_;
sub _{ $_ = wantarray ? shift @__: pop @__; print;}
_;
@_ = _,$_;
$_ = (_,() = _);
$_ = (_,() = _,() = _,(_,_,() = _));
$_ = () = (_,_,() =_,(_(_),_));
@_ = (@_,$_ = _,() = _,(_)) , (_,_);
_((_(() = _)));
p.s. I'm _still_ trying to figure out most of your japhs! Every time I
try I end up learning something by accident. :) Ahhh, the joys of
recreational perl!
"Randal L. Schwartz" wrote:
> >>>>> "Brett" == Brett W McCoy <[EMAIL PROTECTED]> writes:
>
> Brett> On Thu, 21 Jun 2001, Timothy Kimball wrote:
> >> Randal L. Schwartz wrote:
> >> : ...
> >> : Second might mean something like:
> >> :
> >> : $foo_length = SOME_LIST # although this can't happen
> >> : ========= list
> >> : = assigned to
> >> : =========== scalar
> >> :<snip a very good discussion>
--
Perl, because 600 billion oysters can't be wrong
Canadian Consulting Services' pet perl hacker
David Labatte [EMAIL PROTECTED]