Sorry, I inadvertantly posted the above to net.unix as well as net.text. So if you've just read it and wonder what it had to do with UNIX the answer is 'not much'. I'll watch what my fingers are getting up to in future (:-).