Re-directing stderr 
Author Message
 Re-directing stderr

     [courtesy cc of this posting mailed to cited author]


:       How can stderr be redirected to stdio?

By reading the FAQ that's on your system because it comes with Perl.

--tom
--
 Timesharing: the use of several people by the computer



Thu, 13 Dec 2001 03:00:00 GMT  
 Re-directing stderr
        How can stderr be redirected to stdio?

Greg Miller: Senior Consultant
Custom CGI Programming: www.iglou.com/mTech/

www.net-chess.com



Fri, 14 Dec 2001 03:00:00 GMT  
 Re-directing stderr


Quote:
>   How can stderr be redirected to stdio?

huh? stdio? You mean stdout? Both of those are predefined constants in
<stdio.h>, and are therefore only useful in C programs.

Now, can you tell me what you really want?

1 - You have a Perl program, and you want to redirect its STDERR output
    to its STDOUT,
    a - in the program
        i. - with minimal code changes
        ii. - by rewriting it so it's easier to manage in the future
    b - from the command line when you run the program,
        i. - on a Unix variant
            a. - in a sh derivative shell
            b. - in a csh derivative shell
            c. - in some other shell
        ii. - on a MS Win* machine
        iii. - on VMS
        iv. - on a Mac
        v. - somewhere else

2 - You are running an external program from perl with system,
    backticks or qx//, and you want to capture its output to standard
    output as well as standard error.

Some of these are actually answered in the FAQ, some others can be
distilled from the documentation, and some others are really not a
perl problem, but a lack of familiarity with your shell/environment.

There are too many answers here, so I won't even try to answer until
you have asked a question which is unambiguously interpretable.

Martien
--
Martien Verbruggen                  |
Interactive Media Division          | In the fight between you and the world,
Commercial Dynamics Pty. Ltd.       | back the world - Franz Kafka
NSW, Australia                      |



Fri, 14 Dec 2001 03:00:00 GMT  
 Re-directing stderr

<URL::">
<>        How can stderr be redirected to stdio?
<>
<> Greg Miller: Senior Consultant

*Senior* Consultant? And unable to read the FAQ?

Abigail
--
perl -wlne '}{print$.' file  # Count the number of lines.

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----



Fri, 14 Dec 2001 03:00:00 GMT  
 Re-directing stderr


Quote:
> How can stderr be redirected to stdio?

stdio? you mean something else i guess..

If you want it to your browser, this is a simple soloution.

use CGI::Carp qw(fatalsToBrowser);

MVH
Martin Quensel



Fri, 14 Dec 2001 03:00:00 GMT  
 Re-directing stderr


Quote:
> How can stderr be redirected to stdio?

stdio? you mean something else i guess..

If you want it to your browser, this is a simple soloution.

use CGI::Carp qw(fatalsToBrowser);

MVH
Martin Quensel



Fri, 14 Dec 2001 03:00:00 GMT  
 Re-directing stderr


Quote:
> How can stderr be redirected to stdio?

stdio? you mean something else i guess..

If you want it to your browser, this is a simple soloution.

use CGI::Carp qw(fatalsToBrowser);

MVH
Martin Quensel



Fri, 14 Dec 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Directing stderr and stdout to a pipe

2. Directing stderr when opening a pipe?

3. How do you direct STDERR into a pipe?

4. CORECTION: redirecting STDERR

5. How to redirect STDERR when not on a TTY

6. warn and redirected STDERR

7. how do I redirect STDERR?

8. Redirecting STDERR

9. redirect STDERR to STDOUT ?????

10. redirecting stderr and stdout

11. redirect STDERR

12. An easier way to redirect STDERR?

 

 
Powered by phpBB® Forum Software