Help for this page

Select Code to Download


  1. or download this
    use List::MoreUtils qw(uniq);
    
    my @a=qw(1 3 4 1 2 3);
    
    print join("-",uniq(@a))."\n";
    
  2. or download this
    1-3-4-2
    
  3. or download this
    my %h;
    @a=map { $h{$_}++ == 0 ? $_ : () } @a;