Day 8. Manipulating Lists and Strings

We'll start Week 2 with a hodgepodge of things; in today's lesson, we'll look more closely at lists, arrays, hashes, and strings, and the sorts of things you can do to manipulate the data they contain. A lot of what you'll learn about today uses many of Perl's built-in functions, but these functions are useful to have in your repertoire as you learn more about the language itself.

Today we'll explore

  • Creating array and hash slices (smaller portions of other arrays and hashes)

  • Sorting lists

  • Searching lists

  • Modifying list contents

  • Processing all the elements of a list

  • Various string manipulations: reverse, finding substrings, extracting substrings

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.