The previous comment shows a good way to do this, but
hashes with duplicate values would present a problem.
%hash = ('a' => 1,
'b' => 1,
);
Would you want to eliminiate one of the keys
%flipped = ('1' => 'b');
or would you want them converted to a more complex structure?
%flipped = ('1' => 'a', 'b');