I'm assuming you've got problems with this line:
%newHash .= \%valueHash;
I'm very surprised that didn't throw a syntax error.
.= is the string concatenation operator. You can't just use it to combine hashes.
You'll want something like:
@newHash{keys %valueHash} = values %valueHash;
Which inserts the key-value pairs in %valueHash into %newHash, overriding any pairs with the same names.
Side note: if you're having trouble with some almost totally unrelated problem, it's probably better to post a new, trimmed-down version of the new problem instead of updating an old one.
|