drewboy has asked for the wisdom of the Perl Monks concerning the following question:
The hash above came from a bigger set of hashes that came from a mysql query that was split. This is assuming that the query had many results.$cat = ('username' => 'Drew', 'password' => 'Boy');
There is another mysql query that results to a hash (let's call it $results) containing several smaller sets of hashes. A sample 'smaller hash' from this query would look like:
My question is, how can I insert the first sample hash ($cat) to $results and at the same time change the names of the keys to 'Name' and 'PW' in place of 'username' and 'password'? Any help will be very much appreciated.$link = ('Name' => 'Andy', 'PW' => 'Girl');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Joining and Applying a different hash to another
by dragonchild (Archbishop) on May 14, 2004 at 20:35 UTC | |
|
Re: Joining and Applying a different hash to another
by Zaxo (Archbishop) on May 14, 2004 at 20:36 UTC | |
|
Re: Joining and Applying a different hash to another
by duff (Parson) on May 14, 2004 at 20:39 UTC |