August 1999 Return to the Perl Hardware Store Slide #19

Reference Operations

        sub unique_objects {
          my (%seen, @result);
          for my $obj (@_) {
            push @result, $obj unless $seen{$obj}++;
          }
          @result;
        }
        function("$x");


Next Copyright © 1999 M-J. Dominus