if ($action eq 'Click to Send'){ exec("/path/to/sudo","-u",$user,"/path/to/predetermined/command"); }