in reply to Getting rid of first space?
print MAIL @messagebody;
That doesn't change the fact that it works as you have it here. If your real program has quotes around @messagebody, remove them and it will work as you expect.
print MAIL @messagebody; worked great!!!!