in reply to perl pre-execution hook

It sounds like you want wrapper-script named 'perl', sym-linked to /usr/local/bin/perl (and wherever else that you have the Perl executable). The wrapper does the sanity checks on code passed to it in @ARGV[0] and decides whether to do a fork-and-exec or drop the offensive bits on the floor.

----
I Go Back to Sleep, Now.

OGB