in reply to Using the same hashes as different object variables
The problem is, you now have two references to the same data. You'd need to copy the data. Perhaps deep-copy the data, but that will depend on your requirements. Copying a hash is trivial:
To make a deep copy, use Data::Dumper (with Purity = 1) and eval the result.my %copy = %original;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using the same hashes as different object variables
by mrguy123 (Hermit) on Jan 20, 2010 at 12:38 UTC | |
by WizardOfUz (Friar) on Jan 20, 2010 at 13:03 UTC | |
by trwww (Priest) on Jan 20, 2010 at 13:12 UTC |