Hello,

> Seems like you're stuck again.  Okay, the problem here is the
> ">/dev/null".  Notice the ">" sign over there.  It's the shell
> redirection metacharacter which causes "the shell" to pipe
> the output of
> one script to a file.  When you use "system" in list context,
> like you're
> doing, you will not be able to use any shell metacharacters
> "> < | & && ...".  The output of the program will go to STDOUT
> automatically--cannot be forwarded or piped.

Thanks for the detail, I prefer to understand why, not just how to make
things work.

> 1.  Use the one-argument call to system just like you type
> your command
> from the shell.
> system "/dir1/dir2/prgname arg1 arg2 arg3 -p /tmp/kc >/dev/null";

Did this, works fine.

> 2.  Check if "progname" has an option to shut it up.  "Usually -q"

No

> If you're the one who wrote that program, then implement -q.

Not me so not possible.

> 3.  Use the backticks and throw away the output:
> `/dir1/dir2/prgname arg1 arg2 arg3 -p /tmp/kc >/dev/null`;
> But this is bad since poor perl will do its best collecting data that
> you'll throw away anyways.

Will stick with 1.

> 4.  Probably there are 10 MWTDI.

ditto

Thanks for the help. Much appreciated.

ken Cole


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to