Chapter 27. Using Perl


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

  • Modules and CPAN

  • Code Examples

  • Reference

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

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



Ubuntu Unleashed
Ubuntu Unleashed 2011 Edition: Covering 10.10 and 11.04 (6th Edition)
ISBN: 0672333449
EAN: 2147483647
Year: 2006
Pages: 318

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