Another option (TIMTOWTDI!) is to use one of the many modules on CPAN for sending mail directly from Perl instead of running a subprocess.
A recent question asked for advice on which of the many modules to use, one of the answers recommends looking at Task::Kensho::Email.
In reply to Re: How to put email addresses in a variable and send mails via mailx command
by jcb
in thread How to put email addresses in a variable and send mails via mailx command
by Kislaya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |