Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,987 courses, including more Developer and personalized recommendations.Start Your Free Trial Now
- View Offline
Download the scripts used in the movies from the Exercise Files tab.
- What is Perl?
- What is CGI?
- Installing a Perl script
- Installing a hit counter
- Installing a contact form script
- Installing a blog script
- Security issues
Skill Level Beginner
- Welcome to Using Perl/CGI Scripts. I'm Bill Weinman. The purpose of this course is to teach you how to use Perl/CGI Scripts. How to install them on your web server, how to make little customizations to them, how to change the variables that you will sometimes need to change in order to be able to get them to work. Just to get you a good understanding, a good feel for how they work and what you will need to do sometimes to get them installed and running on your website.
Throughout this course we'll be using some CGI Scripts that I've written for this purpose. Once you're done with this course, you can always visit my website and find updates to the scripts. I'm planning to put up a little discussion group where the students can interact with each other and give each other advice and tips and things. Mark down this URL here. bw.org/using-perl-cgi. That's where you'll find these things in the future. The first script we'll be looking at in the course is this test.cgi script.
This is all it really does. It's extremely useful for testing out a web server that you haven't been to before or finding out what's wrong with a web server. It's a little test script that runs and echos back the configuration of the server and the versions of Perl and things. We'll also be using this datetime script, which is shown right here. This is an opportunity for you to learn how to use the types of CGI scripts that are included on a web page as opposed to run separately. You'll also learn how to change a variable so that you can get the wording of it to be different on your web page.
Also this little counter, which you see down here. It's a little bit suave, it puts commas in the numbers. Again, it's an include style CGI script. The difference here is you'll have to learn how to install a script that needs to read and write to a file. You'll learn that with that script. Then we'll get on to some of the more interesting scripts. This is a nice, simple blogging script that if you wanna put up a web blog on your website, that's a very popular thing today. A lot of people like to do that. I think I'm gonna start doing that, in fact.
Finally, this is an email contact script. This is the same one that I use on my website when somebody wants to contact me. I don't print my email address anywhere on my website. Instead, I have this nice little form. I already get thousands of pieces of spam a day, I don't need any more, so I just don't publish my email address any more. When people wanna contact me, they just come here. They put in their name, they put in their email address. They put in a subject. I'll put something in here.
And a subject, hi. This is a test. And they come down here and press the button and it gives them an opportunity to edit if they want to, make changes, and then finally go ahead and send the message and it sends me an email. I will not get an email from me. Those are the scripts that we're gonna be covering here. We're also gonna talk about some other common scripts that are out there, some of the pitfalls you can get into, some of the security issues that you might wanna think about.
By the end of this course you should know how to go out and find CGI scripts on the internet and install them on your site. You'll also have a little toolkit of some useful scripts that you can use from the course here as well. All of these scripts are available, if you got this course with a CD Rom or if you got the download files from the website, or you can just grab them from my website there at that URL bw.org/using-perl-cgi.