Is traditional CGI an option? It's been mentioned that in this situation it is your best bet since you're literally running the script once per request. The only difference is going to be that you will have to ensure that your shebang and environmentals are as expected, namely @INC and %ENV.