summaryrefslogtreecommitdiff
path: root/pod/perldata.pod
diff options
context:
space:
mode:
authorIan Goodacre <ian@debian.lan>2011-06-10 21:47:38 +1200
committerFather Chrysostomos <sprout@cpan.org>2011-06-10 09:49:03 -0700
commit9ed2a148ec1ba95f38023eeb18a003bc20d0b45b (patch)
treecac2cd77b7e4a71e6e4bf2fa9631959c891d0470 /pod/perldata.pod
parente8a7a70e88f9938f39cd41afa48caf1f69e66f3a (diff)
downloadperl-9ed2a148ec1ba95f38023eeb18a003bc20d0b45b.tar.gz
Document multi-dimensional array emulation.
Diffstat (limited to 'pod/perldata.pod')
-rw-r--r--pod/perldata.pod14
1 files changed, 14 insertions, 0 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod
index 28e4eccc18..9673ed9129 100644
--- a/pod/perldata.pod
+++ b/pod/perldata.pod
@@ -697,6 +697,20 @@ You can also subscript a list to get a single element from it:
$dir = (getpwnam("daemon"))[7];
+=head2 Multi-dimensional array emulation
+
+Multidimensional arrays may be emulated by subscripting a hash with a
+list. The elements of the list are joined with the subscript separator
+(see C<$;> in L<perlvar>).
+
+ $foo{$a,$b,$c}
+
+is equivalent to
+
+ $foo{join($;, $a, $b, $c)}
+
+The default subscript separator is "\034", the same as SUBSEP in B<awk>.
+
=head2 Slices
X<slice> X<array, slice> X<hash, slice>