in reply to Perl CGI SUDO -> SSH -> Command

$cmd1 = "/usr/bin/sudo -u 'user1 echo "Darn thing wont workr"'";
Yes that's a syntax error. Why didn't you tell exactly what error you got? You should always do that.

Now people think you have some problems with ssh, sudo or some such instead of you being unable to compile your script