X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldata.pod;h=bc564e650d48f1d5eb0e54e8765c672c0fab9fa2;hb=35dec5db1fa207594155432ca55c3b364ee9ecfc;hp=29004f04d09ef2e2605f4dea60a93a75910e1f83;hpb=353c650532037e4006fbdb2176350717f320f7c3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldata.pod b/pod/perldata.pod index 29004f0..bc564e6 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -371,11 +371,6 @@ equivalent to C<$version{2}++>, not to C<$version{'2.0'}++>. =head3 Version Strings X X X -B Version Strings (v-strings) have been deprecated. They will -be removed in some future release after Perl 5.8.1. The marginal -benefits of v-strings were greatly outweighed by the potential for -Surprise and Confusion. - A literal of the form C is parsed as a string composed of characters with the specified ordinals. This form, known as v-strings, provides an alternative, more readable way to construct @@ -390,10 +385,9 @@ more dots in the literal, the leading C may be omitted. 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. -Note that using the v-strings for IPv4 addresses is not portable unless -you also use the inet_aton()/inet_ntoa() routines of the Socket package. +doing a version check. Note that using the v-strings for IPv4 +addresses is not portable unless you also use the +inet_aton()/inet_ntoa() routines of the Socket package. Note that since Perl 5.8.1 the single-number v-strings (like C) are not v-strings before the C<< => >> operator (which is usually used @@ -419,7 +413,7 @@ The two control characters ^D and ^Z, and the tokens __END__ and __DATA__ may be used to indicate the logical end of the script before the actual end of file. Any following text is ignored. -Text after __DATA__ but may be read via the filehandle C, +Text after __DATA__ may be read via the filehandle C, where C is the package that was current when the __DATA__ token was encountered. The filehandle is left open pointing to the contents after __DATA__. It is the program's responsibility to @@ -443,8 +437,11 @@ be treated as if it were a quoted string. These are known as "barewords". As with filehandles and labels, a bareword that consists entirely of lowercase letters risks conflict with future reserved words, and if you use the C pragma or the B<-w> switch, -Perl will warn you about any -such words. Some people may wish to outlaw barewords entirely. If you +Perl will warn you about any such words. Perl limits barewords (like +identifiers) to about 250 characters. Future versions of Perl are likely +to eliminate these arbitrary limitations. + +Some people may wish to outlaw barewords entirely. If you say use strict 'subs'; @@ -636,9 +633,9 @@ key/value pairs. That's why it's good to use references sometimes. It is often more readable to use the C<< => >> operator between key/value pairs. The C<< => >> operator is mostly just a more visually distinctive synonym for a comma, but it also arranges for its left-hand operand to be -interpreted as a string -- if it's a bareword that would be a legal simple -identifier (C<< => >> doesn't quote compound identifiers, that contain -double colons). This makes it nice for initializing hashes: +interpreted as a string if it's a bareword that would be a legal simple +identifier. C<< => >> doesn't quote compound identifiers, that contain +double colons. This makes it nice for initializing hashes: %map = ( red => 0x00f, @@ -675,7 +672,7 @@ name of the array (without the leading C<@>), then the subscript inside square brackets. For example: @myarray = (5, 50, 500, 5000); - print "Element Number 2 is", $myarray[2], "\n"; + print "The Third Element is", $myarray[2], "\n"; The array indices start with 0. A negative subscript retrieves its value from the end. In our example, C<$myarray[-1]> would have been