in reply to syntax check from within perl

AM,

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