Chapter 4. Perl as a (better) sed command
A brief history of | ||
Shortcomings of | ||
Performing substitutions | ||
Printing lines by number | ||
Modifying templates | ||
Converting special characters | ||
Editing files | ||
Converting to lowercase or uppercase | ||
Substitutions with computed replacements | ||
The | ||
Summary |
In this chapter, you’ll learn how to write Perl programs that surpass the limitations of the UNIX sed
command. We’ll start by discussing the historical uses of sed
, and then we’ll consider its modern-day applications—which are quite different.[1]
Then, we’ll explore a variety of commands and scripts that show how Perl can beat sed
at its own game.
A brief history of sed
Although it isn’t ...
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.