Change 21040 by [EMAIL PROTECTED] on 2003/09/05 04:36:48

        [perl #3763] code example error in "perlopentut"

Affected files ...

... //depot/perl/pod/perlopentut.pod#19 edit

Differences ...

==== //depot/perl/pod/perlopentut.pod#19 (text) ====
Index: perl/pod/perlopentut.pod
--- perl/pod/perlopentut.pod#18~19080~  Sat Mar 29 12:39:34 2003
+++ perl/pod/perlopentut.pod    Thu Sep  4 21:36:48 2003
@@ -625,11 +625,11 @@
 
     sub head {
         my $lines = shift || 20;
-        return unless $pid = open(STDOUT, "|-");
+        return if $pid = open(STDOUT, "|-");       # return if parent
         die "cannot fork: $!" unless defined $pid;
         while (<STDIN>) {
-            print;
             last if --$lines < 0;
+            print;
         } 
         exit;
     } 
End of Patch.

Reply via email to