What is Perl?
Perl is a very powerful scripting language originally developed to
process large amounts of files and data from a USENET news feed. It is
an interpreted language originally written for UNIX, but ported to
many operating systems. It can best be described as a combination of
C, sed, awk and Bourne shell, all rolled together.
Where Did it Come From?
Larry Wall created Perl and made it free for anyone to use.
When Should it be Used?
A general set of rules can be used to decide when to use Perl. A
partial list includes:
- File manipulation
- Extraction and processing of data from a stream (eg, file, socket
or pipe) that are embedded within certain fields or patterns
- Fast prototyping of small programs
- When speed is not critical
- Extremely powerful and rich regular expression (regex) engine
- Much faster than "shell" scripts
- Very powerful debugger
- Fast development
- Ported to many platforms
- Powerful system process and user environment capabilities
- Looks good on a resume
Many of the built in Perl functions can be written without parentheses
around the arguments. I find this to be confusing, and consequently,
will enclose all function arguments in matching parentheses. For
foreach $key (sort (keys (%ENV)))
can also be written as:
foreach $key (sort keys %ENV)
which I find more confusing. Both ways are valid, but I will use the former.
A regex used in an example will usually be enclosed in foreard
/", such as
Optional parameters or elements of language syntax will be displayed
in square brackets, i.e., "
Nice to have:
- "Programming Perl" by L. Wall, T. Christiansen and
R. Schwartz, second edition, O'Reilly and Assoc.
- "Mastering Regular Expressions" by
J. Friedl, O'Reilly and Assoc.
- "Perl 5, Desktop Reference" by J. Vromans,
O'Reilly and Assoc.
Where to Get More Information Online
Last Modified: $Date: 1997/09/18 08:45:07 $