Since strings evaluate to themselves, you could just change one line to this:
This would work properly only if you had nothing but strings and regexes in your input file.
And as gaal mentions above, it's very dicy and highly insecure. You're essentially running unknown code -- even if you wrote the contents of the file yourself, a typo can cause havoc.
Update
gaal's comment below is correct. I misspoke. But the warning about eval'ing input strings is still true.
In reply to Re: Reading from file
by VSarkiss
in thread Reading from file
by wilbur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |