in reply to while( each ... ) caught in an infinite loop
You are calling the subroutine again each time the while loop iterates, which means you are constructing and returning a new anonymous hash for each iteration. As the hashref returned is to a newly construct hash, its iterator starts from the beginning each time.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: while( each ... ) caught in an infinite loop
by jettero (Monsignor) on Mar 31, 2009 at 10:47 UTC | |
Re^2: while( each ... ) caught in an infinite loop
by johngg (Canon) on Mar 31, 2009 at 12:37 UTC | |
by jettero (Monsignor) on Apr 01, 2009 at 18:22 UTC |