in reply to Re: Failed Mail::Mailer on AIX 5.3
in thread Failed Mail::Mailer on AIX 5.3

No, I did not install it. Perl came as part of the installation of AIX. If this is the mailer for AIX, how do I go about installling the package?
Ken

Replies are listed 'Best First'.
Re^3: Failed Mail::Mailer on AIX 5.3
by Corion (Patriarch) on Mar 16, 2010 at 14:40 UTC

    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.

      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

        The strict pragma requires you to predeclare all variables you're going to use, to protect you against typos and misspellings of variable names. You have not predeclared your use of %mail and hence strict complains. You might want to use the vars pragma to predeclare variables:

        use vars qw[%mail];