use POSIX; if ( grep { isalpha $_ } split '', $str ) { ... }