my %hash = ( '1' => 'one', '2' => 'two', '3' => 'three' ); my %new; @new{ values %hash } = keys %hash; print Dumper( \%new );