> More direct syntax for hashes
>
> Maintainer: Nathan Torkington <[EMAIL PROTECTED]>
> Date: 5 Sep 2000
> Mailing List: [EMAIL PROTECTED]
> Version: 1
> Number: 196
Nat, I was thinking of writing an RFC on a related issue...
but it could piggy-back on this one (196) if you like the idea.
To wit: assignment to C<keys(%hash)> changes the hash's set
of keys so as to contain only the (key-ized) values in the RHS.
Iow,
keys %hash = @things;
is defined as being equivalent to
@hash{ @things } = ();
This is to support hash-based set operations in a more
natural way, i.e.
keys %hash = grep { exists $a{$_} } keys %b;
--
John Porter
We're building the house of the future together.