sub cprint { $capture ? (print @_) : push(@output,@_); } #### sub cprint { if($capture) { # if $capture is != 0, '' or undef print @_; # print what's passed in } else { # otherwise push(@output,@_); # stuff goes into @output } }