Change 14906 by jhi@alpha on 2002/02/28 00:50:01

        The "list" part of
        
        Subject: [PATCH perlop] .. returns a *list* of *integers*
        From: Mike Guy <[EMAIL PROTECTED]>
        Date: Tue, 26 Feb 2002 18:30:22 +0000
        Message-Id: <[EMAIL PROTECTED]>
        
        plus few nits.

Affected files ...

.... //depot/perl/pod/perlop.pod#101 edit

Differences ...

==== //depot/perl/pod/perlop.pod#101 (text) ====
Index: perl/pod/perlop.pod
--- perl/pod/perlop.pod.~1~     Wed Feb 27 18:00:05 2002
+++ perl/pod/perlop.pod Wed Feb 27 18:00:05 2002
@@ -395,10 +395,10 @@
 
 Binary ".." is the range operator, which is really two different
 operators depending on the context.  In list context, it returns an
-array of values counting (up by ones) from the left value to the right
+list of values counting (up by ones) from the left value to the right
 value.  If the left value is greater than the right value then it
 returns the empty array.  The range operator is useful for writing
-C<foreach (1..10)> loops and for doing slice operations on arrays.  In
+C<foreach (1..10)> loops and for doing slice operations on arrays. In
 the current implementation, no temporary array is created when the
 range operator is used as the expression in C<foreach> loops, but older
 versions of Perl might burn a lot of memory when you write something
@@ -408,6 +408,9 @@
        # code
     }
 
+The range operator also works on strings, using the magical auto-increment,
+see below.
+
 In scalar context, ".." returns a boolean value.  The operator is
 bistable, like a flip-flop, and emulates the line-range (comma) operator
 of B<sed>, B<awk>, and various editors.  Each ".." operator maintains its
@@ -462,7 +465,7 @@
 
     @alphabet = ('A' .. 'Z');
 
-to get all normal letters of the alphabet, or
+to get all normal letters of the English alphabet, or
 
     $hexdigit = (0 .. 9, 'a' .. 'f')[$num & 15];
 
End of Patch.

Reply via email to