sub cprint {
$capture ? (print @_) : push(@output,@_);
}
is short for
sub cprint {
if($capture) { # if $capture is != 0, '' or undef
print @_; # print what's passed in
} else { # otherwise
push(@output,@_); # stuff goes into @output
}
}
See the section Conditional Operator in perlop for $foo ? $bar : $quux.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|