diff options
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlsyn.pod | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 4e1bc0a8a7..311be28962 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -228,6 +228,8 @@ The following compound statements may be used to control flow: if (EXPR) BLOCK if (EXPR) BLOCK else BLOCK if (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK + unless (EXPR) BLOCK + unless (EXPR) BLOCK else BLOCK LABEL while (EXPR) BLOCK LABEL while (EXPR) BLOCK continue BLOCK LABEL until (EXPR) BLOCK @@ -252,7 +254,8 @@ all do the same thing: The C<if> statement is straightforward. Because BLOCKs are always bounded by curly brackets, there is never any ambiguity about which C<if> an C<else> goes with. If you use C<unless> in place of C<if>, -the sense of the test is reversed. +the sense of the test is reversed. In Perl even C<unless> followed +by C<else> is valid. The C<while> statement executes the block as long as the expression is L<true|/"Truth and Falsehood">. |