in reply to Recognizing Perl in text

Perhaps you could use a Bayesian classifier to identify the perl.

I would take a look at Algorithm::NaiveBayes, and train it with loads of perl (from CPAN), and English (Wikipedia?), and then see how good it is at recognising perl.