in reply to
words wich ends with "f"
I'd go with something like this (yeah, TIMTOWTDI):
$s = "four fifth two frog left leaf fred wolf";
@f = grep (/^[^f]\w*f\w*$/, split(' ', $s));
Results (340 votes),