in reply to finite automata

So... you want to tell whether or not a string is composed entirely of the alphabet a-z? That's pretty easy with a regexp.
if ($string =~ /^[a-z]+$/) { print "Valid\n"; } else { print "Invalid\n"; }
You mentioned finite automata in your subject line, though. Am I missing something else here? ;)

Cheers,
Paul