in reply to detecting $& usage
Sometimes I like to consider code from a non-programming POV. It would seem that if a user has a $& type variable in their code you simply don't want to use it, so they'll have to rewrite their code anyway. With that in mind, can you read their code before running it to see if it contains one of these characters and if it does reject the code outright? Eg. output an error message to them saying that the variables use is illegal and they need to rewrite it? From there you only have to write a simple test into whatever you have to read their code first. Just a suggestion anyway, that may save you having to code around the $& variable.
Dean
|