I've heard of assuming user input is tainted as a good programming practice, but assuming executables on the web server are tainted is a little ridiculous.
If you're afraid of a bug in gcc, then you'd have to assume that Apache and Perl itself are equally unsafe.