Just a wild thought but couldn't you eval the creation of an anonymous subroutine, check the $@ for errors and if none, invoke the subroutine - for example -
$cmd = "sub{ prin 'Howdy'; }"; $sub = eval $cmd; print "Error: ", $@, "\n" if $@; &$sub unless $@;
-derby
In reply to Re: syntax check from within perl
by derby
in thread syntax check from within perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |