in reply to Dumb, non-question: How to return 'nothing'.

The problem is that you're overloading the return value of $iter->(). Which comes from using a closure instead of an object.

I'd say, if your iterating can return anything, including whatever you intent to signal "end of input", you should probably not use a closure. Use an object, and write something like:

while (!$iter->end_of_data) { my $next = $iter->next; ... }