[svn:perlfaq] r7831 - perlfaq/trunk

[email protected] Wed, 13 Sep 2006 05:01:26 -0700 (PDT)
Newsgroups perl.cvs.perlfaq
Message-ID <[email protected]>
Author: rafael
Date: Wed Sep 13 05:01:25 2006
New Revision: 7831

Modified:
   perlfaq/trunk/perlfaq6.pod

Log:
* perlfaq6.pod: fix the example of the question How can I pull
  out lines between two patterns that are themselves on
  different lines?", by Rick Delaney (see perl bug #40084)


Modified: perlfaq/trunk/perlfaq6.pod
==============================================================================
--- perlfaq/trunk/perlfaq6.pod	(original)
+++ perlfaq/trunk/perlfaq6.pod	Wed Sep 13 05:01:25 2006
@@ -143,10 +143,10 @@
 
 	while (<>) {
 		$in_header =   1  .. /^$/;
-		$in_body   = /^$/ .. eof();
+		$in_body   = /^$/ .. eof;
 	# now choose between them
 	} continue {
-		reset if eof();		# fix $.
+		$. = 0 if eof;	# fix $.
 	}
 
 =head2 I put a regular expression into $/ but it didn't work. What's wrong?