in reply to Confusion due to hash

You did not state what should happen in a case like this:
%hash = (10 => 1, 20 => 1, 30 => 2);

Can you elaborate?