Beginning Perl

Peter Kitson

ISBN : 1861003145

Order a printed copy of this book from Amazon.

Cover Design - Beginning Perl

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From Beginning Perl
     Copyright © Simon Cozens

Why Is Perl Such A Great Language?

Perl is in use on millions of computers, and it\'s one of the fastest-growing programming languages available. Why is this? We\'ve already seen a number of reasons for this in the introduction, but I think it\'s worth restating them briefly here.

It\'s Really Easy

Perl is not a difficuly language to learn. It\'s a language that tries to shape itself around the way humans think about problems and provides nothing contrary to their expectations. Perls\' designers believe that Perl is a populist language - and not just for the mathematicians and computer scientists of this world. I know of plenty of people with scientific and non-scientific backgrounds alike who successfully use Perl.

Flexibility Is Our Watchword

Perl doesn\'t want you to see things the way the computer does - that\'s not what it\'s for. Instead, Perl allows you to develop your personal approach to programming. It doesn\'t say that there\'s one right or wrong way to get a job done. In fact, it\'s quite the opposite - the Perl motto is "There\'s more than one way to do it", and Perl allows you to program whichever way makes most sense to you.

Perl on the Web

Perl\'s influence is not felt among the4 shell scripters of the world alone. Not only can it be used for rooting around in directories or renaming files, it also has massive importance in the world of CGI scripting out on the World Wide Web. You\'ll find lots of Perl automating communication betewwn servers and browsers world-wide and in more than one form. Perlscript is a (relativelt new) derivation pf Perl into a proper scripting language that can run both client- and server-side web routines, just as Javascript can. As we\'ve said however, Perl\'smain function on the web is as a way to script CGI routines.

For a while, CGI was the standard way for a web server to communicate with other programs on the server, allowing the programs to do the hard work of generating content on a web while the server dedicated itself to pass that content onto browsers as fast as it could. Of course, web pages are completely text-based and, thanks to its excellent text-handling abilities, PerlCGI set the standard for web server automation in the past. It\'s CGI (and Perl) that we have to thank for the wonderfully dynamic web pages we have become accostomed to on the Internet.

Later on Chapter 12, we will explore the world of CGI on some detail, and among other things, we\'ll also see how to write CGI scripts using Perl. For the moment, however, let\'s get back to learning about Perl itself.