March 2002 Perl Hardware Store 33

9. Selecting n Different Things

        while (keys %h < $n) {
          $h{select_thing()}++;
        }
        @things = keys %h;


Next Copyright © 2002 M-J. Dominus