The concept: A library is placed in my public_html folder, it's purpose to decode a string. But if that library is NOT present, to stop with an error. The way that was suggested before was:
eval("require x.pm");
if ($@) {
print "The library is missing";
}
else{
BEGIN{
eval{"use x"};
}
1123131323fsdfsfsdfsfgdfgdfgghfghfghfgheterterter ...
no x;
}
If the library is present, the decode works fine, and everything is "Hunky Dory". IN THEORY ... if the file is NOT present, the top loop should print an error ... except all that happens is I get an Error 500 as the script sees the encrypted string, and decides it's not a valid program.
Wondered if it was the "$@" so I tried it with flags
$set=0;
$set=1 if eval("require x.pm");
if ($set eq 0){
...
..
Same thing. Tried putting the code into a string:
$_="1123131323fsdfsfsdfsfgdfgdfgghfghfghfgheterterter ..."
That didn't help. So can anyone throw any light on what I'm doing wrong?