in reply to Re^2: Extracting single element from array to be printed in a one liner hash
in thread Extracting single element from array to be printed in a one liner hash
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 Section
Seekers of Perl Wisdom