Skip to content

Instantly share code, notes, and snippets.

@adeishs
Created March 3, 2021 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adeishs/3fead1179cd893bb108716b75bc73ddb to your computer and use it in GitHub Desktop.
Save adeishs/3fead1179cd893bb108716b75bc73ddb to your computer and use it in GitHub Desktop.
Not uniquely sorted
#!/usr/bin/env perl
use List::MoreUtils;
use Data::Dumper::Concise;
my @els = qw(e a p c x e e x);
my @not_uns = sort List::MoreUtils::uniq @els;
my @uns = sort { $a cmp $b } List::MoreUtils::uniq @els;
print Dumper(\@not_uns);
print Dumper(\@uns);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment