in reply to Is Perl worth it? How does perl deal with programmer folly?

As already pointed out, Perl, or any other language I currently know of, will not totally prevent all stupid mistakes. However, it is extremely well suited for CGI scripts and, to answer your question, can help you minimize many risks.

For details take a look at Why Use Perl? and in particular, tilly's reply.