Thanks James, just after I posted I stumbled across the execfile command. Looks like with 'exec' and 'execfile' I should be able to do what I want. What an elegant language.