my $ret = &my_sub(@args); # returns an object that wraps a list if(! $ret->isEmtpy ) { $ret->each( sub { print $_ } ); }