The code below does not include the pipe char. Without it the code does
not work.
Hope this helps,
Regards Gia.


open(mail, "|mail barbozag\@msu.edu");
print mail "bad news: guessed \n";
close (mail);


Mike Rodgers wrote:

> On page 23 of Learning Perl, there are commands to mail a message out.
> I have tried to manually send myself a message with mail and it works.
> The program does not work.  I'm not sure why.  Here is the code:
>
> open(MAIL, "mail EMAIL_ADDRESS_HERE");
> print MAIL "bad news: $somename guessed $someguess\n";
> close (MAIL);
>
> I used my own ID for the email address.  I'm testing this on a
> standalone Linux box here at home.  Like I said, doing mail from the
> command prompt to send myself a test messge worked.
>
> Mike

--
"I am wiser than this man; it is likely that neither of us knows anything
worthwhile, but he thinks he knows something when he does not, whereas when I
do not know, neither do I think I know; so I am likely to be wiser to this
small extent, that I do not think I know what I do not know."

Socrates in Plato's Apology


Reply via email to