You should never remove a warning if you don't understand it perfectly, even if the code still seems to be working properly, it might be doing some extra things that you don't see, or skipping some steps.
Here the problem is that return can happen only once in a function, has it exits it and returns (obviously) the result straightaway. So your for loop is only called for one key of the tied hash, and all the other iterations never have a chance to be ran.
In reply to Re^3: returning the hash reference
by Eily
in thread returning the hash reference
by bhushanQA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |