in reply to Re^3: LWP running as cgi
in thread LWP running as cgi

the -u option of sudo causes it to run as the specified user, in this case 'apache'. If the apache account is set to nologin, it is the only way to run as the apache user.