You don't give us much to go by here, but I suspect
do EXPR i.e;
eval a file; might be a good place to start. As long as your commands are valid perl expression (including self-defined subroutines), it'll just work.
--
In Bob We Trust, All Others Bring Data.