June 2008
Beginner
352 pages
11h 16m
English
Perl has a number of features that make it easy to manipulate an entire list or array.
We mentioned (in Chapter 17) the map and grep list-processing operators. They can do
more than we could include here; see the perlfunc
manpage for more information and examples. And check out the Alpaca
for more ways to use map and
grep.
With the splice operator, you
can add items to the middle of an array, or remove them, letting the
array grow or shrink as needed. (Roughly, this is like what substr lets you do with strings.) This
effectively eliminates the need for linked lists in Perl. See the
perlfunc manpage.