in reply to Re^4: perl script using sudo
in thread perl script using sudo

You're still using backticks. You know, the little ` ` marks? And now you're using backticks and then calling system() with the RESULTS of the backticks. Er, hello?!
my $val = system("/usr/local/www/cgi-bin/ntop/ntop.sh stop"); die "command got results of $val" if $val != 0;
Use regular strings to describe your command, and give that as an argument to the system() function. That runs a command. It returns a NUMBER result, such as 0 for success. As mentioned before, backticks returns a STRING of the program's output, which is a silly way to check for basic success in most cases.

--
[ e d @ h a l l e y . c c ]