Debugging scripts on Demon

I’ve been spending the morning trying to write some generic form scripts for the new work website. Its a nightmare developing the backend when someone else has designed the frontend and all the fields are called textfield1 textfield2 etc. Demon’s help on debugging is available at their Using cgi-bins page