HTML Goodies: PERL Primer, Part 1

By Joe Burns

https://www.htmlgoodies.com/primers/perl/article.php/3478561/HTML-Goodies-PERL-Primer-Part-1.htm (Back to article)

...use these to jump around or read it all

[What You Need] [Why A Path?]
[What Is PERL?]

     If you were going to undertake learning HTML or JavaScript, you're probably pretty much ready to go with the equipment you have right now. A browser and some kind of text editor are all you need to get started.

     PERL is a little different. You need to have access to a server that has granted you permission to use PERL. Some will tell you, as I have been told many times, you can get your own copy of PERL at http://www.perl.com/ (under Downloads) and install it on your own computer. I've never done that so I wouldn't ask that you do it. I am going to teach you using the same methods I used to learn the language. I tested all of my files online, so that's the way I'll suggest you do it. If you want to install PERL on your system, more power to you. If it's successful, let me know.

     I write and edit my PERL scripts in the same text editor I use to write my HTML: Notepad. I suggest you also use Notepad. You may use an assistant program to edit your HTML document. If so, you DO NOT want to edit your PERL scripts in that assistant. HTML assistant programs are known for adding code and altering your work without telling you. These PERL scripts must be saved as text only, with nothing more than what you wrote to the page. Notepad is the way to go.

     Now that you have the tools on your end, let's talk about the server end.


What You Need

     Once you have all of the above, which you may already have, we can get started.


Why A Path?

     You need to know the path to PERL because the scripts that you create needs to know it. PERL is the program that sits on the server. The pages you'll write are PERL scripts. You see, it's not your script that does the work, it's PERL. Your script is simply a bridge between the HTML and the PERL on the server. Think of your script as the instructions, but it's PERL that actually does the work.

     Without that path, the script doesn't know where PERL is located. It can't complete the functions you're asking it to complete. That path connects your script to the engine that drives it. That's why you need a path.


What Is PERL?

     Practical Extraction and Report Language. You sharp-eyed readers may now be wondering why it's spelled "PERL" rather than "PEARL". It's because when the language came out, there already was a "PEARL". (You knew it was going to be a scary scientific answer, didn't you?)

     PERL was almost named "GLORIA", after the wife of the man who invented it, Larry Wall. Wall was given the task of creating a program that would allow interaction and control between computers on both U.S. coasts. He started with a program he had written earlier, rm, and bulked it up to perform all the functions he needed to control 12 computers. PERL was the result.

     And now you're going to start learning it yourself. Primer Two will get you into your server, create a CGI-BIN, and start you on your way to setting file permissions. After the next primer, you'll actually know what I mean when I tell you to chmod to 775.

     Won't that impress your friends?

On to Primer Two...



[What You Need] [Why A Path?]
[What Is PERL?]