Thursday 21 April 2005 11:41:57 pm
How can I add new (key,value) pairs to an existing hash? Here's what I want to do: - create a hash $myhash
{let myhash=hash( name, 'John')}
...
- later in the code add a pair (surname, 'Smith') to $myhash. The equivalent in PHP would be: $myhash{'surname'} = 'Smith' I tried doing this in many ways but it just won't work. Is there any way to do this? And I need a precise sollution for this, not any workarounds.
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|