jim <defenderjim4@no_dam_spam_juno.com> wrote:
> I am having a problem w/SendMail
I can't help with that part, other than checking for
newlines in the arguments.
> sub my_send_mail
> {
> local($fromuser, $touser, $subject, $messagebody) = @_;
You should always prefer lexical (my) variables over dynamic (local)
variables, except when you can't.
my($fromuser, $touser, $subject, $messagebody) = @_;
die "newlines in address" if grep /\n/, $fromuser, $touser;
> local($old_path) = $ENV{"PATH"};
> $ENV{"PATH"} = "";
> $ENV{ENV} = "";
Why are you changing environment variables?
Do you have taint checking turned on or something?
> close(SENDMAIL);
You should be checking the return value from close() as well
as from open().
--
Tad McClellan SGML consulting
Perl programming
Fort Worth, Texas