in reply to How to avoid eval()?

eval is what you use for the most general case of executing perl commands that you have in a string. Why do you want to avoid it?

As it is, the question is a bit like "I'd like to make a phone call, but without using a phone".

If you only want to allow certain operations, several techniques exist, the best choice depends on what exactly you want to do. For example for only evaluating mathematical expressions safely, modules like Math::Expression::Evaluator exist.