Thanks for those comments, particularly the first one. This puzzled me: I originally put the config vars, as you suggest, at the top of the script. But then I thought I shouldn't do that, because the received wisdom seems to be that one shouldn't allow proliferation of what are effectively global variables. I suppose in a script this size that doesn't matter. But actually, what this brings home to me is that I don't really understand
why it is a bad idea to proliferate globals defined for the scope of the whole script. So I don't know how to balance this against the clarity advantages of having them at the top. Any comments on this topic gratefully received.
§
George Sherston