| Next | Tricks of the Wizards | 134 |
while (keys %h < $n) {
$h{select_thing()}++;
}
@things = keys %h;
In scalar context, keys %h is super-efficient.
No, it does not count the keys one at a time.
| Next | ![]() |
Copyright © 2003 M. J. Dominus |