note
tobyink
<p>With <c>$hash{...}</c> a scalar context is imposed on the key. With a slice like <c>@hash{...}</c> list context is imposed on the key.</p>
<c>
use 5.010;
use strict;
sub WA { return wantarray }
my %hash = ('' => 'Hello ', '1' => 'World');
say $hash{ WA() }, @hash{ WA() };
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-757127">
<small><small>
<tt>perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
</tt></small></small>
</div></div>
1007684
1007707