See A Guide to Installing Modules and the README of the distribution. Alternatively, ask your system administrator to either install the module for you or to tell you what mechanism for sending mails to use.
| [reply] |
I decided on Mail::Sendmail. I used CPAN to install and it looks fine. I created a small test program as follows:
#!/usr/bin/perl
#
use strict;
use warnings;
use Mail::Sendmail;
%mail = ( To => 'burtonk@chesterfield.gov',
From => 'burtonk@chesterfield.gov',
Subject => 'Test email from Perl',
Message => "This is a test message from PERL !!"
);
sendmail(%mail) or die $Mail::Sendmail::error;
print "OK. Log says:\n", $Mail::Sendmail::log;
exit ;
When I go to run it:
Global symbol "%mail" requires explicit package name at ./emailit.pl line 14.
Global symbol "%mail" requires explicit package name at ./emailit.pl line 20.
What am I missing, the syntax looks fine?
Ken
| [reply] |
use vars qw[%mail];
| [reply] [d/l] [select] |