Howdy Shawn,
You can't print to two filehandles at once, you'd have to do
it with two print statements.
The alternative is to "dup" one handle to another handle,
which you can do a la peanut butter and jelly sandwiches:
# This dups STDERR to STDOUT so output redirection can come from one pipe.
open(STDERR, ">&STDOUT") or die "% Can't dup stdout";
Note that this will not work for external commands from the script.
That requires other nastiness explained in this FAQ:
http://www.perldoc.com/perl5.6/pod/perlfaq8.html#How%20can%20I%20capture%20STDERR%20from%20an%20external%20command%3f
Cheers
"Jamison, Shawn" wrote:
>
> Is it possible to print to STDOUT and STDERR in one print statement?
>
> STDERR Has been redirected to a file and I was wondering if
>
> print STDOUT STDERR "This is what I want to print\n";
>
> will work of if I need two print statements?
>
> Much Thanks in advance!
>
> Shawn J.
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users