I'm sure I should know how to do this: if an output file name is defined, write output to that file, otherwise to STDOUT, i.e.
if ($outfile) { open($out, ">", $outfile); } else { $out = ??? } print $out $text;
What do I need in the else branch?
Thanks, loris
Update: Just fixed typo in title.In reply to Switching between output to file and STDOUT by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |