Help for this page
my ($last) = $in =~ m/(\w+)$/i; print "last=$last\n"; ... Prints: last=senthil second to last=foo