wrote:
>I'll try to say this succinctly. I make a call using system "unzip -o",
>"$filename" which calls a utility unzip that has 'status' messages
>display to std out. This is fine, however, can I re-direct ( or at the
>very least suppress ) these messages.
> eg. " Inflating README.txt........"
>Any suggestion is appreciated.
Perhaps you are actually interested in reading those messages into your
program. The simplest way to achieve that, is to use backticks
("`command`"), AKA qx. See "qx" in perlop.
But that'll wait till the program is finished before returning. If you
want an intermediate update, you can call
open STATUS, "command |";
and read the output from the command through ordinary readline calls.
while(<STATUS>) { ... }
If you still want more, like piping into the command's STDIN or read its
STDERR separately, check out the modules IPC::Open2 and IPC::Open3. Both
come with Perl.
--
Bart.