I am creating a website and done with some HTML stuff, but I am thinking to create site using CGI and Perl scripting. I don't have much idea on CGI scripting. Can anyone please suggest me how to create a CGI script and how to create web pages with that?
CGI is a standard to interface a webserver and a content provider or external application (let's say a Perl script, a compiled program), I think you better study Perl to code some CGI.
This link is a beginner guide to get started with CGI coding in Perl.
Also if you are beginner in Perl you might look to some other scripting language more dedicated to web, the best example is PHP. But if you are already experienced Perl CGI, the CGI.pm is nice also.
Have a look at A Beginner's Introduction to Perl Web Programming on perl.com.
I would recommend you make use of tools like Template Toolkit or Markapl to make the process of producing and maintaining your HTML view much simpler.
And moving forward you might want to consider looking at using a web framework ranging from something very light like Squatting to a powerful beast like Catalyst.
/I3az/
As far as I understand your question, you say that you wrote your own web server and now want to implement CGI!?
These links should help you:
How to implement CGI in a Web Server
Edit: Check the original question before downvoting me.
Try Ovid's CGI Course - it's a good start. "A Beginner's Introduction to Perl Web Programming" is also a good reading, but with less information.
Later you can try framework like CGI::Application - it should be easy even for a beginner.