clarify that it must be a simple identifier in {}

suggestion from Aristotle Pagaltzis in
https://rt.perl.org/rt3/Ticket/Display.html?id=112914
This commit is contained in:
Ricardo Signes 2012-05-14 09:01:06 -04:00
parent fb55feefe9
commit 34a2706e50

View File

@ -355,8 +355,8 @@ C<$who::0>, and a C<$who's> variable. The last two would be the
$0 and the $s variables in the (presumably) non-existent package $0 and the $s variables in the (presumably) non-existent package
C<who>. C<who>.
In fact, an identifier within such curlies is forced to be a string, In fact, a simple identifier within such curlies is forced to be
as is any simple identifier within a hash subscript. Neither need a string, and likewise within a hash subscript. Neither need
quoting. Our earlier example, C<$days{'Feb'}> can be written as quoting. Our earlier example, C<$days{'Feb'}> can be written as
C<$days{Feb}> and the quotes will be assumed automatically. But C<$days{Feb}> and the quotes will be assumed automatically. But
anything more complicated in the subscript will be interpreted as an anything more complicated in the subscript will be interpreted as an