If it's on the command line, you could use GetOpt::Long::Descriptive to set an optional filename argument for both the normal output and report output and then you wouldn't have to worry about wrangling output stream syntax when running the command.<br>
<br><div class="gmail_quote">On Wed, Mar 7, 2012 at 1:02 PM, Jonathan Otsuka <span dir="ltr"><<a href="mailto:djgoku@gmail.com">djgoku@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF"><div>I want the user to choose what to do with STDOUT and STDERR on CLI. <span class="HOEnZb"><font color="#888888"><br><br>Jonathan Otsuka</font></span></div><div><div class="h5"><div><br>On Mar 7, 2012, at 12:48 PM, Richard Allen <<a href="mailto:rsaxvc@gmail.com" target="_blank">rsaxvc@gmail.com</a>> wrote:<br>
<br></div><div></div><blockquote type="cite"><div><p>You could pipe stderr in the shell seperatelyfrom stdout, but you can also redirect it in perl</p>
<p><a href="http://www.cs.cmu.edu/afs/cs/usr/rgs/mosaic/pl-exp-io.html" target="_blank">http://www.cs.cmu.edu/afs/cs/usr/rgs/mosaic/pl-exp-io.html</a></p>
<p>The second codesnippet under open has an example</p>
<div class="gmail_quote">On Mar 7, 2012 12:41 PM, "Jonathan Otsuka" <<a href="mailto:djgoku@gmail.com" target="_blank">djgoku@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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?<br>


<br>
Jonathan Otsuka<br>
_______________________________________________<br>
kc mailing list<br>
<a href="mailto:kc@pm.org" target="_blank">kc@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/kc" target="_blank">http://mail.pm.org/mailman/listinfo/kc</a><br>
</blockquote></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>kc mailing list</span><br><span><a href="mailto:kc@pm.org" target="_blank">kc@pm.org</a></span><br><span><a href="http://mail.pm.org/mailman/listinfo/kc" target="_blank">http://mail.pm.org/mailman/listinfo/kc</a></span></div>
</blockquote></div></div></div><br>_______________________________________________<br>
kc mailing list<br>
<a href="mailto:kc@pm.org">kc@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/kc" target="_blank">http://mail.pm.org/mailman/listinfo/kc</a><br></blockquote></div><br>