Skip to content

Commit b874994

Browse files
committed
Explain why hash keys need to be quoted
1 parent 25bdb05 commit b874994

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/Type/Hash.pod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ Be careful to quote the keys in the last two methods, as these have no effect:
239239
%h.push(e => 6);
240240
push %h, f => 7;
241241
242+
because they are interpreted as named arguments to C<push>, not positional
243+
arguments.
244+
242245
Also note that push can be used as a replacement for assignment during hash
243246
initialization very useful ways. Take for instance the case of an inverted
244247
index:

0 commit comments

Comments
 (0)