http://www.perlmonks.org?node_id=1202061


in reply to Re: How to preserve values outside a sub
in thread How to preserve values outside a sub

And for more information about the difference between shallow and deep copy, have a look at hash ref mind blow. It will eventually bite you one day.