On Fri, 1 Sep 2000 10:23:27 -0400, John Porter wrote:
>> keys %HASH = LIST;
>>
>> is really
>>
>> @HASH{ LIST } = ();
>
>Sure. Would you have any great objection to adding the alternative syntax?
I have some doubts. See perlfunc -f keys, from which I quote:
If you say
keys %hash = 200;
then `%hash' will have at least 200 buckets allocated for
it--256 of them, in fact, since it rounds up to the next power
of two.
So, in summary: with this new syntax, you cannot safely distinguish
keys %hash = 200;
from
$hash{200} = undef;
--
Bart.
Thread Previous
|
Thread Next