in reply to Re^7: 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?

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
  • Comment on Re^8: How to stop printing the output of a command on screen when the command fails?
  • Download Code

Replies are listed 'Best First'.
Re^9: How to stop printing the output of a command on screen when the command fails?
by ikegami (Patriarch) on Dec 28, 2010 at 22:49 UTC

    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`'