in reply to Re: executing a shell script from perl
in thread executing a shell script from perl

It's a bit unusual to have backticks in void context. Backticks are used to collect the output of the program - running backticks in void context kind of defeats that purpose. About the only reason you want to do this is that you know the program is going to generate output, and you don't want to see that output at all. Still, in such a case, I'd prefer:
system "bind_cpu $out > /dev/null";

Replies are listed 'Best First'.
Re^3: executing a shell script from perl
by Bloodnok (Vicar) on Jan 13, 2009 at 16:35 UTC
    Point taken JavaFan - can't disagree with any of that - I was obviously in too much of a hurry to give it [my response] anything like a _decent_ coating of thinking about ... in which case I'd've done something similar.

    Having said that, since system returns nothing except a return code c/w a signal number, > /dev/null is self-evidently superfluous.

    Update:

    In the light of the update from brother JavaFan, I refer the reader to my last response - which is self-prophesying since I self-evidently give that no thought either - my comment was true from the POV of view of returning output back to the script, but manifestly wrong from the user POV.

    A user level that continues to overstate my experience :-))
      Having said that, since system returns nothing except a return code c/w a signal number, > /dev/null is self-evidently superfluous.
      Not at all. There's a big difference between:
      system "ls -l /etc > /dev/null";
      and
      system "ls -l /etc"
      The former will not print anything. The latter will print the content of /etc.
Re^3: executing a shell script from perl
by Zen (Deacon) on Jan 13, 2009 at 17:40 UTC
    system "bind_cpu $out &> /dev/null";

    That hides all output.