in reply to Redirecting STDOUT

I recommend IPC::Run:

use IPC::Run; run \@command, '>', '/dev/null';
I think IPC::Run is one fricking cool module. Too bad it's a bit slow to load. Maybe that can be fixed....

    -- Chip Salzenberg, Free-Floating Agent of Chaos

Replies are listed 'Best First'.
Re^2: Redirecting STDOUT (ipc::run syntax)
by Aristotle (Chancellor) on May 03, 2003 at 02:34 UTC
    It's a very cool module indeed, but the interface is really nothing short of ugly in my opinion. I understand why it's trying to mimick the shell syntax, but since it is used from within Perl code, it requires a lot of quotes and commata all over the place to carry metacharacters and filenames, resulting in lots of line noise. I have some vague ideas for an interface that'd feel more natural for Perl code, but unfortunately none at all about writing robust guts for this kind of task.

    Makeshifts last the longest.