as is any simple identifier within a hash subscript. Neither need
quoting. Our earlier example, C<$days{'Feb'}> can be written as
C<$days{Feb}> and the quotes will be assumed automatically. But
-anything more complicated in the subscript will be interpreted as
-an expression.
+anything more complicated in the subscript will be interpreted as an
+expression. This means for example that C<$version{2.0}++> is
+equivalent to C<$version{2}++>, not to C<$version{'2.0'}++>.
=head3 Version Strings
+B<Note:> 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<v1.20.300.4000> 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
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<v65>)
+are not v-strings before the C<< => >> operator (which is usually used
+to separate a hash key from a hash value), instead they are interpreted
+as literal strings ('v65'). They were v-strings from Perl 5.6.0 to
+Perl 5.8.0, but that caused more confusion and breakage than good.
+Multi-number v-strings like C<v65.66> and C<65.66.67> continue to
+be v-strings always.
+
=head3 Special Literals
The special literals __FILE__, __LINE__, and __PACKAGE__
=head2 Subscripts
-An array is subscripted by specifying a dollary sign (C<$>), then the
+An array is subscripted by specifying a dollar sign (C<$>), then the
name of the array (without the leading C<@>), then the subscript inside
square brackets. For example: