Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: WHy error message is printed in STDOUT?

by PreferredUserName (Pilgrim)
on Apr 12, 2006 at 13:55 UTC ( #542838=note: print w/ replies, xml ) Need Help??


in reply to Re^2: WHy error message is printed in STDOUT?
in thread WHy error message is printed in STDOUT?

The command in the backticks, not your script, is the thing printing to stderr.

In Unix, you could capture the stderr by redirecting stderr to also go to stdout, like this:

$output = `$cmd 2>&1`
That says "put the stuff going to file descriptor 2 (stderr) into file descriptor 1 (stdout)".

I'm not sure how all that works on Windows.


Comment on Re^3: WHy error message is printed in STDOUT?
Download Code
Re^4: WHy error message is printed in STDOUT?
by johngg (Abbot) on Apr 12, 2006 at 15:17 UTC
    You forgot to tell me I'm stupid! I think this is known as "can't see the wood for the trees" syndrome.

    Oh dear!

    JohnGG

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://542838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-08-22 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (148 votes), past polls