sub occurences { my %h; my $i = 0; push @{$h{$_}}, $i++ for @_; return \%h; }