From: Ruslan Zakirov Date: Sun, 8 Sep 2013 15:40:34 +0000 (+0400) Subject: short documentation for key/value hash/array slices X-Git-Tag: upstream/5.20.0~1897^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23a223651eb285c30a8f5066f3990dcbbd2a87dd;p=platform%2Fupstream%2Fperl.git short documentation for key/value hash/array slices --- diff --git a/pod/perldata.pod b/pod/perldata.pod index 8f05430..2b7a306 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -917,6 +917,23 @@ On the other hand, the leading symbol ('$' or '@') on the array or hash indicates whether you are getting back a singular value (a scalar) or a plural one (a list). +=head3 Key/value hash slices + +A key/value hash slice operation is variant of slice operation that +return list of key/value pairs rather than just values: + + %sub = %h{'foo', 'bar'}; # key/value hash slice + +However, result of such slice can not be localized, deleted or used +in assignment. Otherwise very much consistent with hash slices. + +=head3 Index/value array slices + +Like for hash the following returns list of pairs, but with +index/value pairs: + + @list = %a[3,4,5]; + =head2 Typeglobs and Filehandles X X X<*>