in reply to simple replace question

Text::Trim's function is to strip whitespace off the ends of strings (although I think that I really like morgan's approach).