Created
March 3, 2021 00:42
-
-
Save adeishs/3fead1179cd893bb108716b75bc73ddb to your computer and use it in GitHub Desktop.
Not uniquely sorted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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