in reply to Re^6: How to stop printing the output of a command on screen when the command fails?
in thread How to stop printing the output of a command on screen when the command fails?

It doesn't matter how many different tools you use to capture STDERR, it won't help you when the program doesn't write the error message you are trying to capture to STDERR. See Re^3: How to stop printing the output of a command on screen when the command fails?.
  • Comment on Re^7: How to stop printing the output of a command on screen when the command fails?

Replies are listed 'Best First'.
Re^8: How to stop printing the output of a command on screen when the command fails?
by perl_mystery (Beadle) on Dec 25, 2010 at 01:48 UTC

    What's confusing me is,if I run the below command from command prompt I see stderr getting supressed but where as when I run it in perl using backticks it fails,what could be going wrong>

    >p4 where //depot/perl/tools/files/data.c > NUL: 2>&1

      Please provide the output of the following:

      p4 where //depot/perl/tools/files/data.c > NUL: 2>&1 perl -e'system "p4 where //depot/perl/tools/files/data.c > NUL: 2>&1"' perl -e'`p4 where //depot/perl/tools/files/data.c 2>&1`'