for my $el (@names) { print "not valid" if $input ne $el; }