Hi Marcus,
Marcus Willemsen wrote:
>>>Hi everybody,
>>>
>>>I'm having trouble with setting the path to my sendmail program
>>>when using the -T switch.
>>>Here is a part of the code
>> > ________snippet______
>> >
>> > #!/usr/bin/perl -wT
>> > #Pull in modules, create form etc.
>> >
>> >
>> > sub send_mail {
>> > my $a = shift;
>> > $a = check($a); #sub that check's the email adress
>> > print ("Thank your for ordering our Newsletter.");
>> > $ENV{'PATH'} = "|/usr/sbin/sendmail -oi -t -odq";
>> > open(SENDMAIL, "$ENV{'PATH'}") or die "Can't fork for sendmail:
Why don't you set $ENV{'PATH'} to something else and open the filehandle for sendmail
explicitly?
$ENV{'PATH'} = "";
open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq");
It's one more line (for setting $ENV{'PATH'}, but it should stop -T from complaining.
Are you aware of [EMAIL PROTECTED] I posted my CGI questions to [EMAIL PROTECTED]
until someone notified me of this list.
- Jan
--
If all else fails read the instructions. - Donald Knuth
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>