in reply to Getting rid of first space?

I had no idea that having quotes around @messagebody in the print MAIL "@messagebody\n"; line would put those spaces in... thanks to EVERYONE, especially jasonk!!!

Replies are listed 'Best First'.
Re: Re: Getting rid of first space?
by tall_man (Parson) on Mar 16, 2003 at 18:04 UTC
    The reason for that is another perlvar, $". Here's a skipppet of documentation about it:
    $LIST_SEPARATOR $" This is like ``$,'' except that it applies to array values interpolated into a double-quoted string (or similar interpreted string). Default is a space. (Mnemonic: obvious, I think.)
    Which means that another way to do it is to set $" to "".