in reply to Can you check the syntax of a eval() before executing it?

As prevously mentioned, not really. In fact that's kind of one of the uses of eval now isn;t it? You might consider evaling it in another package though, say via Safe. This could prevent it from having any actual impact while letting you get a syntax check. In fact, this coul allow you to be more restrictive in what you consider valid.

--
perl -pew "s/\b;([mnst])/'$1/g"

  • Comment on Re: Can you check the syntax of a eval() before executing it?