summaryrefslogtreecommitdiff
path: root/pod/perldata.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perldata.pod')
-rw-r--r--pod/perldata.pod9
1 files changed, 9 insertions, 0 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod
index 65689a6056..50b685816e 100644
--- a/pod/perldata.pod
+++ b/pod/perldata.pod
@@ -540,6 +540,15 @@ has no effect. Thus ((),(),()) is equivalent to (). Similarly,
interpolating an array with no elements is the same as if no
array had been interpolated at that point.
+This interpolation combines with the facts that the opening
+and closing parentheses are optional (except necessary for
+precedence) and lists may end with an optional comma to mean that
+multiple commas within lists are legal syntax. The list C<1,,3> is a
+concatenation of two lists, C<1,> and C<3>, the first of which ends
+with that optional comma. C<1,,3> is C<(1,),(3)> is C<1,3> (And
+similarly for C<1,,,3> is C<(1,),(,),3> is C<1,3> and so on.) Not that
+we'd advise you to use this obfuscation.
+
A list value may also be subscripted like a normal array. You must
put the list in parentheses to avoid ambiguity. For example: