The stupid question is the question not asked | |
PerlMonks |
problem with interpolation in an email delivered by mailxby tommysmuffins (Initiate) |
on Jun 02, 2015 at 16:40 UTC ( [id://1128801]=perlquestion: print w/replies, xml ) | Need Help?? |
tommysmuffins has asked for the wisdom of the Perl Monks concerning the following question: I have the following subroutine:
The email body I receive contains only the part of $email_body up to and including the $current_load_avg variable. e.g. "15 minute load average of 4.01" and nothing after that. I'm guessing it has to do with mailx, because if I print the $email_body scalar, it looks fine. I'm perplexed. UPDATE: OK, this is resolved. Toolic was right, printing $current_load_avg as a test printed it on a line by itself. As it happens, that troublesome newline character was the only thing making the email send successful. When I chomped it, all the generated emails had null message bodies. I had to add a "\n" to the print MAIL $email_body;statement. Thanks everyone for the help.
Back to
Seekers of Perl Wisdom
|
|