in reply to Intermixed perl?

Do you need the full power of Perl for your "scripts"? If all you want to do is add simple conditional execution like in your example, the simplest approach might be to extend the interpreter to provide the features you have use-cases for.