uvnew has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks, I am running a perl script which uses 'system' to run (in a loop) a system executable file. The executable program produces a lot of text rubbish on the screen which I do not need: is there any way to have it run "quietly", without any screen text? Many thanks for any advice!

Replies are listed 'Best First'.
Re: System command silent screen
by moritz (Cardinal) on Oct 10, 2010 at 15:44 UTC
    On Linux you can redirect the output (and error stream) to /dev/null, on Windows to NUL (iirc). If the program writes directly to the console, that doesn't work, but luckily that's only very seldom the case.

    Since you didn't tell us the operating system, it's a bit of a guesswork.

    Perl 6 - links to (nearly) everything that is Perl 6.
      Many thanks Moritz. I am using Ubuntu. Sorry for being slow (I don't use Perl often), but what should be the actual command line for redirecting the system command screen output?
        system "$command @arguments >/dev/null 2>&1" and die "...";
        Perl 6 - links to (nearly) everything that is Perl 6.