The email is coming from a web page. I am not using double quotes, just
passing along the variable with the email.
This is how the msg is being sent:
$SendMail = "mail -s ' some text here' $MailUser";
open( MAIL, "| $SendMail ") or die "$$: Can't run $SendMail: $!";
select MAIL;
$MailUser is read from a web form, I am not setting it.
Please let me know if there is a better way of doing this.
Like I mentioned before, the substitution of the plain @ sign does not
work. I needed to use & # 0 6 4 ; to be able to either substitute, find
the index or split the string at the @ sign. ( no spaces in between the
& # 0 ...)
Hi jbauza,
I must be missing something, don't see what your problem is. You said it doesen't work.
You said $MailUser string is populated dynamically (from a function call?).
Any text that is in a string is in solution, stays in solution and never comes out.
That means it doesent matter how its used, it will always be the same (ergo even if quoted
several times).
So, I think your problem lies elsewhere as others have said.
------------------------
use strict;
use warnings;
my $MailUser = '(e-mail address removed)';
my $SendMail = "mail -s ' some text here' $MailUser";
print $SendMail,"\n";
__END__
mail -s ' some text here' (e-mail address removed)