From: Gurusamy Sarathy Date: Thu, 2 Mar 2000 20:52:08 +0000 (+0000) Subject: move doc about v-strings from perlop to perldata (suggested by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=191d61a768175782efd32a263e82c70bcb0d1401;p=p5sagit%2Fp5-mst-13.2.git move doc about v-strings from perlop to perldata (suggested by David Dyck ) p4raw-id: //depot/perl@5452 --- diff --git a/pod/perldata.pod b/pod/perldata.pod index a122d34..4dbc765 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -274,6 +274,7 @@ integer formats: 0xff # hex 0377 # octal 0b011011 # binary + v102.111.111 # string (made of characters "f", "o", "o") String literals are usually delimited by either single or double quotes. They work much like quotes in the standard Unix shells: @@ -323,6 +324,17 @@ C<$days{Feb}> and the quotes will be assumed automatically. But anything more complicated in the subscript will be interpreted as an expression. +A literal of the form C is parsed as a string composed +of characters with the specified ordinals. This provides an alternative, +more readable way to construct strings, rather than use the somewhat less +readable interpolation form C<"\x{1}\x{14}\x{12c}\x{fa0}">. This is useful +for representing Unicode strings, and for comparing version "numbers" +using the string comparison operators, C, C, C etc. +If there are two or more dots in the literal, the leading C may be +omitted. Such literals are accepted by both C and C for +doing a version check. The C<$^V> special variable also contains the +running Perl interpreter's version in this form. See L. + The special literals __FILE__, __LINE__, and __PACKAGE__ represent the current filename, line number, and package name at that point in your program. They may be used only as separate tokens; they diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 53200eb..bd109ef 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -539,7 +539,7 @@ to print ordinals of characters in arbitrary strings: printf "%*vX", ":", $addr; # formats IPv6 address printf "%*vb", " ", $bits; # displays bitstring -See L for additional information. +See L for additional information. =head2 Weak references diff --git a/pod/perlop.pod b/pod/perlop.pod index ac9d4b6..9c8fa23 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -1796,22 +1796,6 @@ operation you intend by using C<""> or C<0+>, as in the examples below. See L for information on how to manipulate individual bits in a bit vector. -=head2 Strings of Character - -A literal of the form C is parsed as a string composed -of characters with the specified ordinals. This provides an alternative, -more readable way to construct strings, rather than use the somewhat less -readable interpolation form C<"\x{1}\x{14}\x{12c}\x{fa0}">. This is useful -for representing Unicode strings, and for comparing version "numbers" -using the string comparison operators, C, C, C etc. - -If there are two or more dots in the literal, the leading C may be -omitted. - -Such literals are accepted by both C and C for doing a version -check. The C<$^V> special variable also contains the running Perl -interpreter's version in this form. See L. - =head2 Integer Arithmetic By default, Perl assumes that it must do most of its arithmetic in