[Kc] say STDOUT and warn STDERR

Jonathan Otsuka djgoku at gmail.com
Wed Mar 7 11:09:21 PST 2012


$ script.pl
Data1
Data2
Data3
Processed: 100 records

$ script.pl > file
Processed: 100 records

Jonathan Otsuka

On Mar 7, 2012, at 12:48 PM, Richard Allen <rsaxvc at gmail.com> wrote:

> You could pipe stderr in the shell seperatelyfrom stdout, but you can also redirect it in perl
> 
> http://www.cs.cmu.edu/afs/cs/usr/rgs/mosaic/pl-exp-io.html
> 
> The second codesnippet under open has an example
> 
> On Mar 7, 2012 12:41 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
> _______________________________________________
> kc mailing list
> kc at pm.org
> http://mail.pm.org/mailman/listinfo/kc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20120307/e7dae49a/attachment.html>


More information about the kc mailing list