Help for this page

Select Code to Download


  1. or download this
    @data_out = uniq(@sorted_data);
    
    ...
        return (uniq(@xs)) if grep {substr($x,0,7) eq substr($_,0,7)} @xs;
        return ($x,uniq(@xs));
    }
    
  2. or download this
    foreach (reverse @sorted_data) {
        unshift(@data_out, $_) unless ($seen{substr($_,0,7)}++);
    }
    
  3. or download this
    @data_out = nub(@sorted_data);
    
    ...
        return $x unless @xs;
        return (nub(grep {substr($x,0,7) ne substr($_,0,7)} @xs), $x);
    }