Hi again,,
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. So, you have many possible
solutions:
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";
2. Check if "progname" has an option to shut it up. "Usually -q"
If you're the one who wrote that program, then implement -q.
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.
4. Probably there are 10 MWTDI.
Hope this helps,,,
Aziz,,,
In article <[EMAIL PROTECTED]>, "Ken Cole"
<[EMAIL PROTECTED]> wrote:
> Now I want to add a redirection of the screen I/O to /dev/null as well.
> I tried:
> @args =
> ("/dir1/dir2/prgname","arg1","arg2","arg3","-p","/tmp/kc",">/dev/null");
>
> which works on the command line but once again generates an error as an
> invalid argument when run from perl with system command.
>
> Why? What am I missing here.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]