It is simple, but it doesn't quite match the sample results. This approach ignores elements in %hash that are not in @mips, whereas the original example removed them.
Here's a small rework that fixes it:
my %newhash = ();
for (@mips) {
$newhash{$_} = $hash{$_} || 999;
}
%hash = %newhash;