perlartistic and perlgpl reformatting from Sean Burke.
[p5sagit/p5-mst-13.2.git] / pod / perlsyn.pod
index 16bca2d..1b5a6a9 100644 (file)
@@ -315,6 +315,14 @@ hang.
        # do something
     }
 
+Using C<readline> (or the operator form, C<< <EXPR> >>) as the
+conditional of a C<for> loop is shorthand for the following.  This
+behaviour is the same as a C<while> loop conditional.
+
+    for ( prompt(); defined( $_ = <STDIN> ); prompt() ) {
+        # do something
+    }
+
 =head2 Foreach Loops
 
 The C<foreach> loop iterates over a normal list value and sets the