Browse files

Fix to regex as reported in…

  • Loading branch information...
1 parent 507d36c commit 9be0139bb81d7ba9645b5366c17685f60ffb419d @ranguard ranguard committed Jan 22, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 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>

0 comments on commit 9be0139

Please sign in to comment.