sub filter (&@) { my ($func, @out) = @_; $func->() for @out; wantarray ? @out : join '', @out; }