in reply to cgi web page always 'Loading'

I can only give you a general debugging advice:

First thing for me would be to find out if it's a Perl or an nginx config problem.

I'd suggest running the cgi manually from the command-line and to check the output - probably also piped to a file and opened in a browser too.

If it looks OK, you'll have to fix nginx.

If not, than you can narrow the problem by shortening the script.

HTH. :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery