Either make the new hash also a tied hash, or pass a reference to the hash. The latter is more efficient, but if you change the hash inside the sub, the outer hash (which is the same) is changed as well.
In reply to Re: having a hash maintain order when passed to a sub
by JavaFan
in thread having a hash maintain order when passed to a sub
by metaperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |