my $password ="asdf"; if (index("qwertyuiopasdfghjklzxcvbnm",lc($password)) > -1) { ... }