in reply to get last matches of the given string

If you use captures in a repeated match (with + or *), then the regex engine will capture the last match. So you can try:
if($in =~ /(?:\W*(\w+))+/) { print "Last word: $1\n"; }
With your data, that prints
Last word: senthil