It works !!!!
Thanks to everyone who has patiently helped over the last decade whilst i have been trying to get scripts to work.
Finally it has happened, and everything works. (I don't know for how long !!)
Problem turned out to be chmod permissions on my cgi-bin.
apparantly it has to be set to 711.
Thanks again everyone
Tony
Before you criticise someone walk a mile in their shoes......
Then, if they don't like what you say they are 1 mile away and barefoot.