Chapter 2. Perl essentials

2.1

Perl’s invocation options

17

2.2

Using variables

23

2.3

Loading modules: -M

27

2.4

Writing simple scripts

29

2.5

Additional special variables

42

2.6

Standard option clusters

44

2.7

Constructing programs

47

2.8

Summary

51

This chapter introduces the most essential features of Perl, to pave your way for the programming examples you’ll see in the following chapters. Among the topics we’ll cover here are the use of Perl’s special variables, how to write Perl one-line commands and scripts, and the fundamentals of using Perl modules.

But we don’t discuss everything you need to know about Perl in this chapter. Further details on this chapter’s topics—and more specialized ones not discussed here—are presented in later chapters, in the context of ...

Get Minimal Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.