in reply to Re^4: perl script using sudo
in thread perl script using sudo
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.my $val = system("/usr/local/www/cgi-bin/ntop/ntop.sh stop"); die "command got results of $val" if $val != 0;
--
[ e d @ h a l l e y . c c ]
|
|---|