in reply to I got two questions, please see here:)

To suppress output of the command, use the capture method from IPC::System::Simple. The capture command replaces the backticks. For example:
#!/usr/bin/perl use strict; use warnings; use IPC::System::Simple qw(capture); my @output = capture("ls", "/root/Desktop");
The output's there just not printed to output. To retrieve the results:
#!/usr/bin/perl use strict; use warnings; use IPC::System::Simple qw(capture); my @output = capture("ls", "/root/Desktop"); print @output, "\n";

Replies are listed 'Best First'.
Re^2: I got two questions, please see here:)
by wildnature (Novice) on Feb 18, 2011 at 09:48 UTC

    I tried this method, but it doesn't work

     capture ("dumpcap -i eth0")

    It still print the output :(