On Sun, Jun 16, 2013 at 4:21 AM, Ruslan Zakirov <ruz@bestpractical.com> wrote: > > Hi, > > Not sure what to do in the following case: > > $ ./perl -Ilib/ -E 'my %h = 1..10; say qq{ %h{"1","3"} }' > %h{"1","3"} > $ ./perl -Ilib/ -E 'my %h = 1..10; say qq{ @h{"1","3"} }' > 2 4 > > Probably it should be left alone as the following doesn't work: > > $ ./perl -Ilib/ -E 'my %h = 1..10; say qq{ %h }' > %h > > Enabling interpolation will probably cause troubles. > If someone really wanted that to happen, they could surround the kv slice with @{[ ]} $ perl -E 'my %h = 1..10; say qq{ @{[ %h{"1","3"} ]} }' $ perl -E 'my %h = 1..10; say qq{ @{[ %h ]} }'Thread Previous