To get rid of the warnings, you can write
if (defined $data{$key} && $data{$key} eq $input) { ... }
Also, please do read, understand and apply Writeup Formatting Tips.
In reply to Re^3: Extracting single element from array to be printed in a one liner hash
by moritz
in thread Extracting single element from array to be printed in a one liner hash
by wildguess123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |