I was asked at work to do some documentation on writing secure applications in Perl. Here's what I've come up with so far. I would appreciate any comments/feedback so I can make it even better. Enjoy .
A better way to secure all your Perl files and web site in general:
cd /usr/apache/htdocs (or wherever your web site is stored)
chmod -R 644 *
chmod -R 755 *.pl (substitute .pl for the extension on your Perl scripts)
This will give the appropriate permissions to all your HTML files (rw-r--r--) and Perl scripts (rwxr-xr-x) and secure all other files by only allowing other people to read them (of course, if you have any files that you don't want others to look at, chmod 600 or 700 will do the trick).
Better still, put the above lines of code in a script and create an entry in crontab to check each day/hour whatever so that if you update any new files the permissions are still kept.