in reply to How do I push new data into an existing hash?

To append to one of the values, treat it like any other scalar and use the .= operator: $hash{key} .= 'string'.

To merge two hashes into a third, use %third = (%first, %second).

To add a second hash to the first, use @first{keys %second} = values %second (You could use the merging technique, but that's very inefficient).
  • Comment on Re: How do I push new data into an existing hash?

Replies are listed 'Best First'.