Using Perl/CGI Scripts
Video: introductionGet the skills necessary to edit and install basic Perl and CGI scripts.
Viewers: in countries Watching now:
Installing a Perl/CGI script doesn't have to be difficult, and making small modifications shouldn't take a rocket scientist. Designed for the web professional, Using Perl/CGI Scripts explains in simple step-by-step instructions how a CGI script works. You will acquire the skills you need to edit and install a Perl script on your server, and even make simple modifications without having to hire an expensive programmer! Complete with working examples of counters, contact forms, and even a web blog, Using Perl/CGI Scripts will guide you through the process of customizing and installing these scripts on your own web site.
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
- 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.
There are currently no FAQs about Using Perl/CGI Scripts.