summaryrefslogtreecommitdiff
path: root/pod/perlsyn.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlsyn.pod')
-rw-r--r--pod/perlsyn.pod8
1 files changed, 8 insertions, 0 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index 16bca2d6b5..1b5a6a940e 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -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