I'm also not quite sure what you're going for here. If you
have a word such as 'foo.bar', you'd probably just want
to do something like
my($before, $after) = split(/\./, $word);
Or, if the word might contain multiple periods
my @tokens = split(/\./, $word);
If you need to check that there is a period in the word, you
should use the if statement posted above before splitting.
If you want to verify that a word contains only letters,
you'd want to do a matching regular expression prior to the
$word =~ /^[a-zA-Z]+\.[a-zA-Z]*$/;
And potentially throw in some /s* if you want to check for
whitespace in it.