> > my($name) = "John"; > my($mailprog) = '/usr/sbin/sendmail'; > my($recipient) = '[EMAIL PROTECTED]'; > open (MAIL, "|$mailprog -t"); #The script fails here
Try this: open (MAIL, "|-", "$mailprog" , "-t"); #avoids using the shell or you can do at the top of script: $ENV{PATH} = 'bin:/usr/bin'; # restrict the path env var > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]