Tom Christiansen wrote:
> >If it were possible to assign to the keys of a hash, we'd be 
> >a lot closer to our ideal:
> 
> >  keys(%intersection) = map { exists $set1{$_} ? ( $_ => 1 ) : () } keys<SNIP>
> 
> >but this is not currently legal perl.
> 
>     keys %HASH = LIST;
> 
> is really
> 
>     @HASH{ LIST } = ();

Sure.  Would you have any great objection to adding the alternative syntax?
It's a lot clearer, imho: the source and dest of the assignment are on the
RHS and LHS of an =, respectively.  

-- 
John Porter

        We're building the house of the future together.

Reply via email to