The stupid question is the question not asked | |
PerlMonks |
Re^5: Loop through array or filehandleby Laurent_R (Canon) |
on Sep 30, 2016 at 11:48 UTC ( [id://1172990]=note: print w/replies, xml ) | Need Help?? |
The call to create_iter should not be in the while loop, create_iter should be called only once, to obtain the right iterator.
What should go into the while condition is the call to the iterator returned by create_iter (i.e. $iter->() in my sample code).
In Section
Seekers of Perl Wisdom
|
|