$ perl -wle " %foo = 1..4; print for @foo{qw# 1 3 #}; print $^V " Scalar value @foo{qw# 1 3 #} better written as $foo{qw# 1 3 #} at -e line 1. 2 4 v5.12.2 $ perl -wle " %foo = 1..4; print for @foo{q#1#, q#3#}; print $^V " 2 4 v5.12.2