01-07-20 02.35, skrev schwern@pobox.com på schwern@pobox.com följande: > >> |> clamp() unfortunately violates this. You have to put all your keys in >> |> the hash before clamping it, so there's effectively no way to >> |> distinguish between a valid key which has not been set yet and a valid >> |> key which is set to undef >> >> exists() > > Here's the problem. How can I have a clamped keyset of 'foo' and > 'bar' where C<exists $clamped_hash{foo}> is false? Is this realy a problem, a clamped keyset is all keys in the set, if foo is in the set it will return true on exists, otherwise false. What you want to do is to have a prototype for a hash with the keys, that is much slower since we have to compare against that prototype, and that is the same has dealing with pseudohashes. -- ArthurThread Previous | Thread Next