in reply to hash and it's keys...

First of all, put "use warnings;" at the top of your code; it will help you immensely with all kinds of problems.

@hash{'one'} = "123" does work, but is better said as $hash{'one'} = "123".

$key = keys... is calling keys in a scalar context (asking for only one value). keys is documented to return the number of keys in the hash in this case. Say foreach my $key (keys %hash) instead, or while (my $key = each %hash).