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

Re: [FWP] Testing list?



Uri Guttman wrote:
> >>>>> "JP" == John Porter <jdporter@min.net> writes:
> 
> 
>   JP>     my( $a, $b, $c ) = foo();
> 
>   JP>     ( $a, $b, $c ) ||= ( 1, 2, 3 );
> 
>   JP> and this:
> 
>   JP>     ( $a, $b, @c ) ||= ( 1, 2, 3, 4, 5 );
> 
> yecch!! that implies the || is applied to each member on the left side
> and matching with the right side. 

Huh?  
	( $a, $b, @c ) ||= ( 1, 2, 3, 4, 5 );
would be the same as
	( $a, $b, @c ) or
	( $a, $b, @c ) = ( 1, 2, 3, 4, 5 );

Both the predicate and the assignment are straightforward.

-- 
John Porter

"There are people who have fun studying the C++ spec for
literally seconds on end, I'm sure..."    John Vlissides


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