my %hash = ( a => 1, b => 2, c => 3 ); my %inverted_hash = reverse %hash;