SPUG: Slice of HashOfHash

John W. Krahn krahnj at telus.net
Tue Nov 28 11:00:02 PST 2006


Yitzchak Scott-Thoennes wrote:
> On Tue, Nov 21, 2006 at 12:36:15AM +1100, Jacinta Richardson wrote:
>>I suspect he means dor (//): defined or.  In 5.10 you'll be able to write:
>>
>>	$a //= 0;
>>
>>which will be the same as writing:
>>
>>	$a = ( defined $a ? $a : 0);
> 
> Make that:
> 
>     defined $a ? $a : ($a = 0);

Really?  You will get a "void context" warning doing that.


John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall


More information about the spug-list mailing list