in reply to Return a list or an iterator

there was some discussion on p5p some time ago, about the return value from subroutines like the one you are using:

sub foo { shift @foo if @foo }