summaryrefslogtreecommitdiff
path: root/pod/perldata.pod
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2010-10-22 12:40:26 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2010-10-22 12:40:26 +0200
commit0de1010603c15b1a365c5442011e03772e8806df (patch)
treec5a83aa1f7846759f6ac4079ce51011ee5f26991 /pod/perldata.pod
parenta0da4400009c3faf23e2057bcb5148c9a1f30d53 (diff)
downloadperl-0de1010603c15b1a365c5442011e03772e8806df.tar.gz
Fix on doc patch from Moritz Lenz (from IRC)
Diffstat (limited to 'pod/perldata.pod')
-rw-r--r--pod/perldata.pod2
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod
index 4f08d24490..4ec9eb55a1 100644
--- a/pod/perldata.pod
+++ b/pod/perldata.pod
@@ -766,7 +766,7 @@ Slices in scalar context return the last item of the slice.
@a = qw/first second third/;
%h = (first => 'A', second => 'B');
$t = @a[0, 1]; # $t is now 'second'
- $u = @h{'first', 'second'}; # $u is now 'second'
+ $u = @h{'first', 'second'}; # $u is now 'B'
If you're confused about why you use an '@' there on a hash slice
instead of a '%', think of it like this. The type of bracket (square