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

Perl 101 (Part 1) - The Basics

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
If you're a Web programmer, you're probably already well-versed with the intricacies of client-side scripting. But where there's a client, there must be a server - and so, this week, DevShed is kicking off a series of tutorials on server-side scripting. With power such as this, young Jedi, there is no limit to the evil you will be capable of...

First, though, let's start with the basics.

Server-side scripting is not new. It's been around for quite a while on the Web, and almost every major Web site uses some amount of server-side scripting. Amazon.com uses it to find the book you're looking for, Yahoo! uses it to store your personal preferences, and GeoCities uses it to generate page statistics.

Despite this, you're probably wondering why server-side scripting is such a big deal - after all, you've probably seen what a few simple JavaScripts can do. The reason for its popularity is very simple - JavaScript runs within a client application, usually the browser, and as such can only access resources, such as the current date and time, on the client machine. Since server-side scripts run on the Web server, they can be used to access server resources such as databases, system variables and other useful thingamajigs.

Just as there are different flavours of client-side scripting, there are different languages which can be used on the server as well. Here's a quick list of some of the more popular ones:

Active Server Pages [http://msdn.microsoft.com/workshop/server/asp/ASPover.asp] was introduced by Microsoft in its IIS Web server, ostensibly for the purpose of "web application programming". While ASP currently runs only on the Windows server platform, plans are afoot to port it to the UNIX platform as well.

Next up, ColdFusion, developed by Allaire [http://www.allaire.com]. ColdFusion syntax bears a remarkable resemblance to HTML, making it very easy for a budding web programmer to migrate to it. At the moment, it's available for both Windows NT and Linux. The only drawback: it ain't free, McGee!

Python [http://www.python.org] is an interpreted, object-oriented high-level scripting language for UNIX, often compared to Tcl, Perl or Java. It has modules, classes and interfaces to system calls, and is also extensible. It has been ported to Windows, DOS, OS/2 and the Macintosh, and has a devout following in the UNIX community.

And then there's the current flavour of the month, PHP [http://www.php.net]. Very easy to use, it's free, widely available for UNIX systems, and particularly strong in the areas of database access. The latest version is PHP4, and a final release is expected shortly.

And finally, Perl, one of the most popular languages around [and the language used throughout this tutorial - such is fame!]. Here's how its creator, Larry Wall, describes it: "PERL, an acronym for Practical Extraction and Report Language, is an interpreted language optimized for scanning arbitrary text files, extracting information from these files, and printing reports based on that information. It is also a good language for many system management tasks. The language is intended to be practical - easy to use, efficient, and complete - rather than beautiful - tiny, elegant, and minimal.

 
 
>>> 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: