http://www.perlmonks.org?node_id=910299


in reply to Re^3: Dumb, non-question: How to return 'nothing'.
in thread Dumb, non-question: How to return 'nothing'.

Seeing as a scalar is always being returned,

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

can be shortened to

while( my ($next) = @{ $iter->() } ) { ... }