in reply to Re: Dumb, non-question: How to return 'nothing'.
in thread Dumb, non-question: How to return 'nothing'.
That's a nice solution, but is there any particular reason to use an arrayref rather than a scalarref? It'd make the iterating code just a bit cleaner:
while( my $next = $iter->() ) { $next = $$next; ... }
As opposed to:
while( my $next = $iter->() ) { ($next) = @$next; ... }
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
|
|---|