Help for this page

Select Code to Download


  1. or download this
    sub util_remove_duplicates {
      my %hash;
    ...
      @hash{ref $_[0] eq 'ARRAY' ? @{$_[0]} : @_} = ();
      return keys %hash;
    }
    
  2. or download this
    sub util_remove_duplicates {
      @{$_[0]} = keys %{ { map{$_=>1} @{$_[0]} } };
      return;
    }