Home arrow Perl Programming arrow Page 2 - Perl 101 (Part 1) - The Basics

...And The Little Language That Could! - Perl

Known as much for its confusing, often oddball, syntax as for itsefficiency and speed, Perl has a mystique that very few languages canmatch. This first article in a new series gives novice and intermediateprogrammers an introduction to the basics of the language.

TABLE OF CONTENTS:
  1. Perl 101 (Part 1) - The Basics
  2. ...And The Little Language That Could!
  3. Your First Perl Program
  4. To Err Is Human...To Debug, Divine!
  5. What's Next?
By: Vikram Vaswani and Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 16
May 23, 2000

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
Perl is a very popular language for server-side scripting primarily because of its close relationship with the UNIX platform. Most Web servers run UNIX or one of its variants, and Perl is available on most or all of these systems. The language is so powerful that many routine administration tasks on such systems can be carried out in it, and its superior pattern-matching techniques come in very useful for scanning large amounts of data quickly.

Geeks will be happy to hear Perl is an interpreted language. Why is this good? Well, one advantage of an interpreted language is that it allows you to perform incremental, iterative development and testing without going through a create/modify-compile-test-debug cycle each time you change your code. This can speed the development cycle drastically. And programming in Perl is relatively easy [famous last words!], especially if you have experience in C or its clones. Perl can even access C libraries and take advantage of program code written for this language, and the language is renowned for the tremendous flexibility it allows programmers in accomplishing specific tasks.

And then of course, there's cost and availability - Perl is available free of charge on the Internet, for the UNIX, Windows and Macintosh platforms. Source code and pre-compiled binaries can be obtained from http://www.perl.com/, together with installation instructions. The examples in this series of tutorials will assume Perl 5.x on Linux, although you're free to use it on the platform of your choice.

If you're on a UNIX system, a quick way to check whether Perl is already present on the system is with the UNIX "which" command. Try typing this in your UNIX shell:

$ which perl
If Perl is available, the program should return the full path to the Perl binary, usually

/usr/bin/perl
or

/usr/local/bin/perl
Or if you're really lazy, you could just ask your system administrator.

On any other platform, try checking your PATH environment variable for a directory containing the Perl executable.

 
 
>>> More Perl Programming Articles          >>> More By Vikram Vaswani and Harish Kamath, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PERL PROGRAMMING ARTICLES

- Perl Turns 25
- Lists and Arguments in Perl
- Variables and Arguments in Perl
- Understanding Scope and Packages in Perl
- Arguments and Return Values in Perl
- Invoking Perl Subroutines and Functions
- Subroutines and Functions in Perl
- Perl Basics: Writing and Debugging Programs
- Structure and Statements in Perl
- First Steps in Perl
- Completing Regular Expression Basics
- Modifiers, Boundaries, and Regular Expressio...
- Quantifiers and Other Regular Expression Bas...
- Parsing and Regular Expression Basics
- Hash Functions

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: