It looks like several things are likely going on here, and I suggest you approach them one at a time:
1) the .cgi files (that are not relying on fastcgi) - The premature end of script headers - not real informative error message but is often the result of corrupted or incorrect format files - the first thing I would try with that is to dump the use of the net2ftp php application and try uploading them with a real ftp client and making sure that is done in ASCII mode, and with proper *nix line endings.
2) It looks like your paths are messed up (see the "file does not exist" errors)
3) There may also be permission errors on files the code needs to use (from the series of files being run, and no look at the code) your guess is better than mine as to what this might be.
In short, this looks like a "multi-file" application, where some parts depend on others - I couldn't begin to debug it in this manner. The main.htm, and main.html, and others "is "template" a directory or a "file"? , etc. - this needs to be looked at with an understanding of how it all works together - and I have no way to do that.
First, were you ever able to get the test code in your earlier post to fun? - start there - if you can't get that to work, there is something fundamentally wrong with the way you are going about running these files. If you can get that sorted, you will have a basis from which to start figuring out how to configure your production files.
Additionally, you might consider enlisting the aid of someone who is perl/CGI savvy - the problems are likely not too difficult to resolve by someone with the requisite knowledge and who has access to the whole site/application files/ directories, etc. -
That all said, if these are "custom" scripts - you should enlist the aid of their author for getting them installed on DH - if they are a commercial product - you might try the support mechanisms of the company that sold you the scripts. I suspect that, for someone who has complete access, and installation instruction for the application, there should be little problem in getting then to run on DH - certainly, getting the perl scripts to run is likely to be far less problematic than if they were PHP scripts - Someone who knows about perl and cgi just needs to work through the whole setup.