# Get the lowest PID in the list $pid_list = substr($pid_list,rindex($pid_list," ") + 1,length($pid_list) - rindex($pid_list, " ")); # If two aren't equal, restart server if($pid ne $pid_list)