my (@a, %h);
$_ = '1:1,2:1,3:2,500:2,505:1';
#234567890#234567890#234567890#234567890#234567890#234567890
# 47 characters ...
%h=map{@@=/[^:]+/g;$a[$#a+1]=$@[0];@@}/[^,]+/g;
# 44 ...
%h=map{@@=/[^:]+/g;push@a,$@[0];@@}/[^,]+/g;
# Based on duff's whimsy above ... 42 characters
%h=@a=/[^:,]+/g;@a=@a[grep!($_%2),0..$#a];
# Further whimsy ... 29 characters
%h=/[^:,]+/g;@a=/([^,:]+):/g;
Rules:
- You can assume all the code above the counting line.
- Bonus points if you run under strict and warnings.
Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.