The OP wanted to type apples for example and have it say "fruits". To do this you need:
if ( $key eq $input ) { ... }
In reply to Re^4: Extracting single element from array to be printed in a one liner hash
by Lotus1
in thread Extracting single element from array to be printed in a one liner hash
by wildguess123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |