in reply to Re: Print value from hash
in thread Print value from hash

Not taking away from your insight, but I think it's important for future readers of any code to see where de-referencing begins.

perl always knows when anything in a (hash) structure is another structure and allows you to not require the deref operator (->) because it's implicit, but I'd recommend putting such in the path where dereferencing starts:

print "$name{$search}->[0]\n";

Easier to spot where things become a reference at a glance.

-stevieb