in reply to Suppress STDOUT of a called program

You could open a filehandle to read the nmap command and read each line in a loop. That way your script receives the command output, not the user, and you can parse the results and sanitise them for consumption by your clients. Something like

use strict; use warnings; my $nmapCmd = q{/path/to/nmap -and -any -args}; open my $nmapFH, q{-|}, $nmapCmd or die qq{fork: $nmapCmd: $!\n}; while ( <$nmapFH> ) { chomp; # Do something with nmap output here ... print qq{Sanitised stuff for user\n}; } close $nmapFH or die qq{close: $nmapCmd: $!\n};

I hope this is of use.

Cheers,

JohnGG