Chapter 29. Using Perl

 < Day Day Up > 

IN THIS CHAPTER

  • Using Perl with Linux

  • Perl Variables and Data Structures

  • Operators

  • Conditional Statements: if/else and unless

  • Looping

  • Regular Expressions

  • Access to the Shell

  • Switches

  • Modules and CPAN

  • Code Examples

  • Reference

Perl (Practical Extraction and Report Language) is a powerful scripting tool you can use to manage files, create reports, edit text, and perform many other tasks when using Linux. Perl is included with Fedora and could be considered an integral part of the distribution, as Fedora depends on Perl for many types of software services, logging activities, and software tools. If you do a full install from this book's CD-ROMs, you will find nearly 150 software tools written in Perl installed under the /usr/bin and /usr/sbin directories.

Following the birth of the World Wide Web in the early 1990s, Perl took off as the language of choice for Common Gateway Interface (CGI) programming, which is used to extend features of websites and make the Web more than just a resource for document publishing. With the recent interest in the Open Source movement, Perl has gotten almost as much press as Linux, although many experienced Linux users have been using Perl for quite some time.

Perl is perhaps not the easiest of programming languages to learn because it is designed for flexibility. This chapter shows how to create and use a Perl script on your system. You'll see what a Perl program looks like, how the language is structured, where you can find modules of prewritten code to help you write your own Perl scripts, and several examples of Perl used to perform a few common functions on a computer system.

This chapter also includes additional sources of information about Perl; consult the listing of websites, books, and online periodicals at the end of this chapter. The quest toward becoming a Perl hacker need not be long and arduous, but you will benefit from the generous help offered by other members of the Perl developer community. Perl works quickly and efficiently on a Linux system, but learning how to create good Perl programs will take some effort.

     < Day Day Up > 


    Red Hat Fedora 4 Unleashed
    Red Hat Fedora 4 Unleashed
    ISBN: 0672327929
    EAN: 2147483647
    Year: 2006
    Pages: 361

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net