{ local *STDOUT; open STDOUT, '>', "c:\\log\\$ip.log" or die $!; my @args = ('-v','-A',$ip); system('nmap', @args); }