@letters = qw(a a a b b b c c c);; @word = qw(a a a b b);; ++$h{$_} for @letters;; --$h{$_} for @word;; print map{ ($_) x $h{$_} } keys %h;; c c c b