In processing the form submission can you foward the user from the php script to a url of a perl cgi script with engr as a parameter? You want them to go to a url like
http://mysite/myperlscript?engr=somevalue. I am not sure how to do this in PHP.
In the perl script have something like this to get the parameter into a scalar and do something with it.
use CGI;
my $cgi = new CGI;
...
my $engr_value = $cgi->param("engr");
#Do something with based on the value of $engr_value
Of course you will have to take into account the fact that the script will run under reduced privileges similar to the web server. This would be the same with the other suggestions made.