Help for this page

Select Code to Download


  1. or download this
    # your arrays
    my @a = qw(a c d);
    ...
    my @unique = sort keys %unique;
    
    # @unique is now the unique elements of those arrays.  Kudos.
    
  2. or download this
    my %unique = map { $_=>1 } @a, @b, @c, @d;
    my @unique = sort keys %unique;