http://www.perlmonks.org?node_id=267583


in reply to adding key/value pairs to a hash.

$key = 'd'; $value = 4; $hash{$key} = $value;

That's all you need to do.
Update:
Just wanted to say that hashes can be used for so many different things, internal (e.g. %ENV, %INC, %main) and external, in perl; you will want to master them. If you're not getting enough from the 'camel' book, try the Black Book and perldoc -q hash.