Change the print to be whatever you want to do if there are errors (syntax or runtime) in the string of $code.my $sourcepackage = caller; eval "package $sourcepackage; $code"; print "Error in eval: $@" if $@ ne '';
------------ :Wq Not an editor command: Wq
In reply to Re: Execute commands in a string
by etcshadow
in thread Execute commands in a string
by aplonis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |