Perl is great because it can change its behavior dynamically.
This is a very bad way to get dynamic behavior:
if(-s "somescript.pl"){ $result = eval `cat somescript.pl` }Yes, this is a technique found in live, deployed code...
push
alternative unearthed by John Porter.
At least he checked for existence of the file!
Re:Could be worse
jmm on 2003-05-20T22:32:21
And that is unworse how?He took no alternate action if the file wasn't there. So, just doing the eval without checking the result has the same effect.