Date Published: 1999-08-01
by D. Jasmine Merced
In one of my previous articles, we clarified that CGI is not Perl. That
primary building block completed, we can continue
onto discovering the basics of perl, the programming language of choice for cgi programs. Please
remember, in this series of articles, we are building a knowledge base from
the ground up. Each future article will expand and build on previous articles to help you gain a working
knowledge of PERL. This series is not intended to teach you how to program in perl.
However, if you do wish to learn how to create your own perl programs, we invite you to review
some of the many perl
books for sale.
As you may be aware, Perl is a very robust programming language. It is considered an interpreted
programming language, which means that the program is run in line-by-line order, from top to bottom.
The most widely distributed Perl code is always in a text-only format, meaning you can use any text
editor to view or edit it. This allows you to edit perl programs to your liking. All you need to know to
start customizing code is a few simple basics.*
In this article, we will discuss variables, arrays, hashes (associative arrays) and subroutines, the most
common building blocks of all perl programs.
* Please be sure to read the EULA (End User License Agreement) that comes with the program you wish to
customize. Many programmers require that in order for you to use the program, that the code must not be
altered in any way. In most cases, if you choose to customize the program, you will not be eligible for
support for the product anymore. Be sure you understand the copyrights and support policies of the
There are many reasons for wanting to learn the basics of perl without getting completely engrossed with
learning how to develop your own programming languages.
- Save money on customizations.
- If you've already purchased or downloaded perl cgi programs and installed them on your website,
you know that you're sometimes limited with how the program will look. How many times do you wish
you knew how to make those little changes that would make the program seem like a part of your
web site, and not an afterthought? What about the typos (horror!) that sometimes the programmers
overlook? But when you open the program in your text editor, you cringe, whine, whimper, close the
file and hope your visitors don't blame you. (Of course, if you mention typos to programmers, they
will correct them as quickly as possible.)
- Most programmers offer customization services for a fee, usually with a minimum charge of one hour.
We've seen these customization rates for as little as free to upwards of $200/hr. Free
"customizations" are typically not specific to your web site, and will be included in the next
release of the program.
- But what if you just wanted to change the background, font or wording a little? Is it worth
money or time to you? If not, this series will help guide you with the simple modifications you can
make without incurring costs.
- Save time
- As mentioned before, programmers are often available for customizations. But often they are
inundated with projects, and cannot get to your customizations for some time. Some even say they
cannot perform any customizations whatsoever.
- Also, the more you know, you will be less likely you will be to cause errors, and you'll be able
to quickly locate the possible source of an error should one occur.
- Expand your Comfort Zone
- It's a fact, the more you know about any subject, and the more you practice with it, not only will
your skills increase, but your comfort level will, too. Even if you're primarily a webmaster, the
time will come when you'll need to add interaction with your web site (feedback forms, guestbooks,
etc.). You're probably doing those things already if you're reading this article.
- The first few times you install a perl program, you may fumble along (a completely normal thing),
pull out your hair, and hesitate every step of the way. Knowing about perl basics will greatly
assist you in quickly and effectively installing perl programs.
Now, we're ready to get started. The first step is a core facet of perl: Variables...
D. Jasmine Merced is a partner in Tintagel
Net Solutions Group, Inc. and the administrator of The Perl Archive. She also serves as a Director of
the World Organization of Webmasters.