Skip to content

Instantly share code, notes, and snippets.

@aanoaa
Created December 5, 2011 06:15
Show Gist options
  • Save aanoaa/1432531 to your computer and use it in GitHub Desktop.
Save aanoaa/1432531 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
my @arr = qw/a b c d f s f d c c s f e s v c x x z d f e s f d f/;
my %cont;
for my $item (@arr) {
$cont{$item}++;
}
my @result = sort keys %cont;
print "@result\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment