Skip to Main Content
Sams Teach Yourself Perl in 21 Days, Second Edition
book

Sams Teach Yourself Perl in 21 Days, Second Edition

by Laura Lemay, Rafe Colburn
May 2002
Beginner content levelBeginner
704 pages
16h 37m
English
Sams
Content preview from Sams Teach Yourself Perl in 21 Days, Second Edition

Manipulating Strings

In the bulk of this lesson, we've explored ways you can manipulate lists and list contents with various built-in functions. Perl also has several useful functions for manipulating strings as well (and I summarized a number of these on Day 2). In this section, let's cover a few of these functions, including reverse, index, rindex, and substr.

Each of these functions is used to modify strings. In many cases, it might be easier or more efficient to modify strings using other mechanisms—concatenating them using the . operator, building them with variable values using variable interpolation, or searching and extracting substrings with patterns (as you'll learn in the next few days). But in many cases, these functions might be ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sams Teach Yourself Perl in 24 Hours

Sams Teach Yourself Perl in 24 Hours

Clinton Pierce
Perl Debugged

Perl Debugged

Peter Scott, Ed Wright

Publisher Resources

ISBN: 0672320355Purchase book