in reply to Array of words

split the string by space
split(" ", $str); now
foreach (split(" ",$str)) { print substr($_, -3); }
substr will give you the substring.

Replies are listed 'Best First'.
Re^2: Array of words
by ccn (Vicar) on Oct 21, 2008 at 06:49 UTC
    that does not work with punctuation marks in a sentence