Help for this page

Select Code to Download


  1. or download this
    sub sortuniq {
      my $aref = shift @_;
      @$aref = sort(uniq(@$aref, @_));
      }
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "use Test::More tests => 2;
    ...
    1..2
    ok 1 - Duplicate added, sorted
    ok 2 - Non-duplicate added, sorted