Not so much shorter, but avoids the 5.12 dependency:
sub occurs{
my %h;
push @{ $h{ $_[$_] } }, $_ for 0 .. $#_;
return \%h
};;
pp occurs( 2, 1, 3, 4, 3, 4, 4, 5 );;
{ 1 => [1], 2 => [0], 3 => [2, 4], 4 => [3, 5, 6], 5 => [7] }
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
/blockquote |