Perl has a number of strong security-related features that can make a program written in Perl more secure than the corresponding program written in C. Probably the most important of these is data-flow analysis, better known as taint checking. When this is enabled, Perl keeps track of which pieces of data seem to have come from the user or environment and are therefore untrustworthy. If any such piece of so-called "tainted" data is used to affect another process, file, or directory, Perl will prohibit the operation and abort the program. It's not perfect, but it's a powerful way to prevent security-related mistakes. There's more to the story; see the perlsec manpage.