Ugh.

ziggy on 2003-05-19T19:29:36

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...


Yikes

vsergu on 2003-05-19T19:40:40

Reminiscent of the push alternative unearthed by John Porter.

Could be worse

petdance on 2003-05-19T20:03:07

It could be worse.

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.