In do_something you replace the passed in hash reference you copied into $hash with a new hash so the original hash doesn't get altered.
In do_something_else you use the copied reference to access the original hash and update it.
In both cases $hash starts out with a reference to the original hash.
In reply to Re: hash question
by GrandFather
in thread hash question
by duyet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |