Help for this page

Select Code to Download


  1. or download this
    my @set = qw(a a b c c);
    my %seen;
    my @unique = grep { not $seen{$_} ++ } @set;
    
  2. or download this
    my @set = qw(a a b c c);
    my %seen;
    @seen{@set} = ();
    my @unique = keys %seen;