in reply to hash dereferencing / copying

The code my $that={%$this} will do for copying one level of references. But if you want more than one level, it won't:
my $this={name=>'alex',array=>['one','two']}; my $that={%$this}; $that->{name}='Ido'; print $this->{name}; #alex - not affected $that->{array}[0]='three'; print $this->{array}[0];#three - affected
In order to copy more than one level of references, use Data::Dumper:
use Data::Dumper; my $this={name=>'alex',array=>['one','two']}; my $that=eval Dumper $this; $that->{name}='Ido'; print $this->{name}; #alex - not affected $that->{array}[0]='three'; print $this->{array}[0];#one - not affected