[Kc] say STDOUT and warn STDERR

Chris Stinemetz chrisstinemetz at gmail.com
Wed Mar 7 11:01:11 PST 2012


On Wed, Mar 7, 2012 at 12:40 PM, Jonathan Otsuka <djgoku at gmail.com> wrote:
> I have a program that process/format a file then prints to STDOUT which I may want to save/redirect to a file. I also create a report of the data that was processed, but I don't want the report output sent to STDOUT and was thinking of using warn since its output is to STDERR. Is there another way or is this the best way?
>
> Jonathan Otsuka
> _______________________________________________
> kc mailing list
> kc at pm.org
> http://mail.pm.org/mailman/listinfo/kc

Why not open a filehandle to redirect the output?

open my $out, '>', $output or die "Error opening $output: $!";

print $out .... "you fill in the blanks..."


More information about the kc mailing list