A
atbusbook
%foo = {i=>1,b=>2};
print $foo{i};
its output == ""
print $foo{i};
its output == ""
%foo = {i=>1,b=>2};
print $foo{i};
its output == ""
1perl -e '%foo = (i => 1,b => 2); print $foo{i}'
David said:You've used the wrong sort of brackets:
1
1perl -e '$foo = {i => 1,b => 2}; print $$foo{i}'
%foo = {i=>1,b=>2};
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.