From: Gurusamy Sarathy Date: Fri, 17 Mar 2000 16:45:34 +0000 (+0000) Subject: tweak perldata section on v-strings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9c62f5bd2be329234f46e9e65cc9ed3b85e615b;p=p5sagit%2Fp5-mst-13.2.git tweak perldata section on v-strings p4raw-id: //depot/perl@5785 --- diff --git a/pod/perldata.pod b/pod/perldata.pod index 6ffd38c..3e10e6f 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -275,7 +275,6 @@ 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: @@ -332,7 +331,13 @@ 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 +omitted. + + print v9786; # prints UTF-8 encoded SMILEY, "\x{263a}" + print v102.111.111; # prints "foo" + print 102.111.111; # same + +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.