in reply to hash and it's keys...
@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).
|
|---|