Perl Fundamentals
Copyright
by Ruben I Safir
October 11, 1999
The specific purpose of this document is to give an outline of usable Perl
fundamentals for the experienced computer user who does not have an extensive
programming background. This makes up the majority of today's computer users
in the age of the PC. Today large portions of the workforce and general
population have been introduced to many computer applications in a Graphic
User Interface environment. Many of these users have become well versed in the
click and go world of Windows or MacOS, but find themselves unfamiliar with
text editor and command line execution. Most are completely unfamiliar with
powerful shell environments such as is available in Unix. In fact, many
exhibit a phobia of the command line because of their negative experience with
the simple and ineffective command line that is available in DOS. As a result,
this class of user has never tapped into the full power of their PC environment.
It is the intention of these pages to teach Perl as an extension of the
general computing environment. It is largely aimed at Corporate Training and
Adult Education, though it is my hope that these pages will be useful for
anyone from age 12 and up. In the process of teaching Perl, I hope to debunk
several myths about Human/computer relations. I hope to demystify the basics
of computer usage and enable the end user. By the end of this program one
should have not only a basic knowledge of Perl, but also disprove the
following assumptions about computer usage in the modern era:
- End users can not and should not be asked to
program: i.e.: Programming is too difficult for your typical end user.
Modern word processors, spread sheet applications, desktop publishing
software and graphic programs far exceed the complexity of most common uses
for Perl, and yet Perl is more powerful than any single application. If one
can learn to read and write, do simple arithmetic, and solve simple word
problems, then they can certainly be effective programmers. It is interesting
that Larry Wall, the creator of Perl, is a linguistics. Perl is designed to be
understood at a gut level. In some respects, learning Perl, or any programming
language, is just a matter of learning how to talk to your computer. One
learns a number of idioms and phases, and mixes them around to create new
concepts. Learning idioms and syntax is more important than learning the P's
and Q's of exacting detail if one is to learn to speak Perl effectively. Just
as children learn to speak long before learning what a noun and a verb is, so
one should approach learning a programming language. Learn to speak the
Language first, then worry about memorizing the specifics
of the difference between "" and 0.
- End users can not and should not know there is a
command line
The fear of the command line is based on the limitations that it presents
as a friendly editing environment in DOS. There is no such problem in Unix, as
the command line Unix is powerful, easy to manipulate, and often the best way
of doing things. Many of the skills learned in Perl carry over to the command
lines in Unix. Learning Perl naturally introduces the shell. Command line are
easy once the fundamentals are learned.
- End users can not and should not be asked to
read....just click and go
Words are good, documentation is great, and end users CAN read.
Civilization started about 5,000 years ago with the invention of the alphabet.
It has taken mankind over 5 millennium to perfect the written language.....and
Steve Jobs 5 years to blast us back to the Hieroglyphics ages. Is 40
non-descript icons on a word processor really easier to understand than the
printed word?
What is Perl:
The Practical Exteraction and Reporting Language
Perl is a natural outgrowth of the Unix Enviorment. The Language was
originally creatred as an advanced tool for Unix system administration. It has
grown to be much more than this, and yet remains faithful to it's origins.
Perl, after C, C++, Bourn Shell Scripting and Assembly, can be considered as
one of the foundations of modern programming.
- Perl will be an fundemental language for the forseeable future because of
the following reasons:
- Perl is currently ported to most computing enviorments including MacOS,
Unix, Windows, DOS, and Mainframe enviorments.
- Perl is easy to learn and borrows syntax from most other familiar languages.
- Perl is easily extended through modules and libraries.
- Perl is easy to learn.
- Perl is open source, no one company or entity controls it's fate.
- Perl is well supported.
- Perl is free.
- Perl uses structured and/or object oriented programming design.
- Perl easy to itegrate with other programming languages and
applications. It supports pipes and can be embeded in other languages.
- Perl has powerful regular expression capability.
The fact that perl is open sourced, free and well supported guarantees that
the communitee of programers who use and develope Perl control it's evolution
and existance. The original authors of Perl are often seen on usenet
newsgroups, online servers like Compuserve, and mailing lists, helping end
users with problems and questions. It is not likely that you can get help with
a programming problem in Visual Basic from Bill Gates. It is common to get
Perl help from one of it's major contributers, like Randal Schwartz.