I am not following why you needed to create the temp
hash. My output appears to be correct for the example
given with the following line of code.
for(@mips){$hash{$_}||=999}
UPDATE:
Thanks
crazyinsomniac, after reading these posts several
times and talking with you in CB I realize that the example
above did not have G in it once it was processed. I read
the question and did not examine the output. In the text
of the original question it does not state that missing
keys should be removed, it merely states that the values
should be 999 if they have none.