in reply to nested variable resolution
Take a look at Math::Expr. It stores math expressions as a parse tree object. You can store such objects in files with Data::Dumper.
Unixish Shell Scripting languages
Other (post in comments)
Results (334 votes). Check out past polls.