in reply to Getting rid of first space?

Looks to me like the print @messagebody is the culprit. It's supplying an extra space between each element of your list. You don't need to chop, just print them differently. For example:
foreach (@messagebody) { print; }
Update: It's somewhat odd for print to be doing that unless your $, variable is set to a space. (See perlvar for details).