mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
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:
parent
fb55feefe9
commit
34a2706e50
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user