in reply to hash dereferencing / copying
This works because it creates a new anonymous hash and assigns it to $this, whereas in your first example you're just dereferencing $this and then assigning a reference to it (still with me ;-). So in your second example you're creating a new hash in %that and then assigning a reference to it, which is why it doesn't effect $this.$this = { foo => bar }; $that = { %$this }; $that->{foo} = "not bar"; print $this->{foo}; __END__ bar
broquaint
|
|---|