summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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