in reply to Re^2: returning the hash reference
in thread returning the hash reference
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: returning the hash reference
by Discipulus (Canon) on Mar 15, 2016 at 10:39 UTC |