You can just add everything to one `if` statement.

```perl
if($_ and $_ !~ /[A-Z]/ and $_ !~ /[a-z]/) {
   ...
}
```