You could do a frequency analysis of the characters. I'm sure perl programs have a much different character distribution than encrypted data. Encrypted data should probably have a very flat frequency graph (i.e. all characters occur in equal proportions) but perl code would have a much different set of ratios.