我在玩 Perl 并写了一个小型电子邮件程序。它是这样的:
# -w
#the purpose of this program is to send an email .
print "Hello. Welcome to Paramjot's Mail Program. Please enter your name.\n";
$name = <STDIN>;
chomp ($name);
print "Hello, $name. Please type in the email address you wish to send your email to\n";
$mailadds = <STDIN>;
chomp ($mailadds);
open MAIL, "|mail $mailadds";
print "Please type the message you wish to send below.\n";
$message = <STDIN>;
chomp ($message);
print MAIL "$name says: $message";
close MAIL;
出于某种原因,当我运行程序时,它会一直工作,直到程序应该询问消息,而是说
mail is not recognized as a batch file, internal or external command, or an application.
我该怎么做才能解决这个问题?