well.... this validates the code all right! the problem is that it executes the perl code also ;) I need another way to check if the code is valid... but does not execute it. any ideas ?!? thanks! Jean-Daniel# check to see if code is valid sub check_valid_code { my ($lang, $code) = @_; if ($lang eq 'perl') { $code .= "\n1;\n"; return eval ($code); } 0; }
In reply to Check if perl code is valid by jdgamache
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |