Summary

Perl provides all the power of C arrays with none of the headaches. (You don’t have to worry about dimensions, going off the end, resizing, and so on.)

But Perl goes far beyond what you can do with C. For example, Perl has array expressions as well as scalar ones. Also there is a rich set of array manipulation functions such as shift, unshift, push, pop, and splice. Thus Perl lets you perform complex array operations with a few simple operators.

Perl also provides a rich set of operations for examination and manipulation of strings as you see in Chapter 4.

Get Perl for C Programmers 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.