In Perl6 (and 5.10!) you can:
%hash{$key} //= $something
Which checks for definedness rather than truth, but what we are missing is checking for existance. I propose the cunning %% operator:
%hash{$key} %%= $something
:)
Someone proposed just that in one of Damian's talks today at YAPC. I've not seen him stunned in quite a while.
Re:I Heard This Today
gav on 2003-06-17T03:08:51
That was me:)