R
Rocky
Hi. I wrote a script to monitor a tomcat error log.
http://www.bobotheclown.org/scripts/jakartalog
My boss wants to put all the recipients and hostnames in another file so
that we can change it per site.
here is what I tried
#!/usr/bin/perl
use strict;
use warnings;
use Net::SMTP;
require ('hello.pl');
my $hostname = $ENV{HOSTNAME};
my $jakartahome = $ENV{CATALINA_HOME};
my $logdir = "$jakartahome/logs";
hello.pl looks like this:
my $recipient1 = 'EMAIL1 HERE';
my $recipient2 = 'EMAIL2 HERE';
my $recipient3 = 'EMAIL3 HERE';
my $recipient4 = 'EMAIL4 HERE';
my $recipient5 = 'EMAIL5 HERE';
my $mailfrom = 'MAILFROM HERE';
my $fromaddress = "ISEETHEFROM HERE";
The problem is that the main script does not see the recipients from the
file. I am sure this is because of the way I have it scoped, but I know
no other way. Any pointers will be appreciated.
Rocky
http://www.bobotheclown.org/scripts/jakartalog
My boss wants to put all the recipients and hostnames in another file so
that we can change it per site.
here is what I tried
#!/usr/bin/perl
use strict;
use warnings;
use Net::SMTP;
require ('hello.pl');
my $hostname = $ENV{HOSTNAME};
my $jakartahome = $ENV{CATALINA_HOME};
my $logdir = "$jakartahome/logs";
hello.pl looks like this:
my $recipient1 = 'EMAIL1 HERE';
my $recipient2 = 'EMAIL2 HERE';
my $recipient3 = 'EMAIL3 HERE';
my $recipient4 = 'EMAIL4 HERE';
my $recipient5 = 'EMAIL5 HERE';
my $mailfrom = 'MAILFROM HERE';
my $fromaddress = "ISEETHEFROM HERE";
The problem is that the main script does not see the recipients from the
file. I am sure this is because of the way I have it scoped, but I know
no other way. Any pointers will be appreciated.
Rocky