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
In reply to Re^2: Print value from hash
by stevieb
in thread Print value from hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |