Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix to regex as reported in https://rt.cpan.org/Public/Bug/Display.ht…

  • Loading branch information...
commit 9be0139bb81d7ba9645b5366c17685f60ffb419d 1 parent 507d36c
@ranguard ranguard authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/perlfaq5.pod
View
6 lib/perlfaq5.pod
@@ -244,11 +244,7 @@ first, then print the line that you want to add.
To delete lines, only print the ones that you want.
- perl -ni -e 'print unless /d/' inFile.txt
-
- ... or ...
-
- perl -pi -e 'next unless /d/' inFile.txt
+ perl -ni -e 'print if /d/' inFile.txt
=head2 How do I count the number of lines in a file?
X<file, counting lines> X<lines> X<line>
Please sign in to comment.
Something went wrong with that request. Please try again.