my %hash # lets assume this already has stuff in it { my %tmp_hash = map /(\S+)\s+(.*)/, ; @hash{ keys %tmp_hash } = @tmp_hash{ keys %tmp_hash }; }