in reply to get last matches of the given string
if($in =~ /(?:\W*(\w+))+/) { print "Last word: $1\n"; } [download]
Last word: senthil [download]