Todd, Thanks for your help but I tried both and received the same results. First I tried placing use lib qw(E:/perl/lib); at the beginning of my code like this:
#!perl -w #/usr/bin/perl use lib qw(E:/perl/lib); $cmd = 'srvrmgr /g apollo.ts.checkpoint.com /e CHK_ENT_PRD /s CHK_SBL_PRD /u xxxxxx /p xxxxxx /c "list tasks for server CHK_SBL_PRD component Email Manager" > emailmgr.txt'; $result = `$cmd`; # note back-ticks #open a file with the filehandle open EMAILMGR, "+<..\\..\\emailmgr.txt" or die "Cannot open email manager $!\n"; #my $data = <EMAILMGR> for (1..22); #Testing to make sure I am #grabbing the correct data---- for(my $i=0; $i<22; $i++){<EMAILMGR>}; #This will put you at row 23.---- $_=<EMAILMGR>; my $line=$_; if (substr($line, 42, 7) eq "Running") { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); open (APPEND, ">>Moniterlog.log") or die "$! error trying to append"; if ($hour> 12) { print APPEND "Successfully Completed Email Manager Moniter ",$hour-12,":$min\n"; } else { print APPEND "Successfully Completed Email Manager Moniter $hour:$min\n"; } } else { use Mail::Sendmail; #Send and email if there are errors %mail = ( To => '[EMAIL PROTECTED]', From => '[EMAIL PROTECTED]', Subject => '', Message => 'Email Manager: '.substr($line, 95, 17), ); sendmail(%mail) or die $Mail::Sendmail::error; print "OK. Log says:\n", $Mail::Sendmail::log; } Received the following error: E:\sea621\siebsrvr\BIN>emailmgr.pl Can't locate Mail/Sendmail.pm in @INC (@INC contains: E:/sea621/siebsrvr/BIN/lib E:/sea621/siebsrvr/BIN/site/lib .) at E:\sea621\siebsrvr\BIN\emailmgr.pl line 3 0. BEGIN failed--compilation aborted at E:\sea621\siebsrvr\BIN\emailmgr.pl line 30. Then placed sendmail.pm in the following folder: sea621/siebsrvr/BIN/site/lib/mail/sendmail.pm And got the same error. It is bizarre. Thanks Lance -----Original Message----- From: Todd Wade,,,Room 108 [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: Re: Send mail quesiton Lance Prais wrote: > All, > I am trying to "use Mail::Sendmail" to send mail. The problem is that > the sendmail is in the right folder. The only thing that comes to mind is > that I am doing this on NT > > The path for the sendmail.pm is perl/lib/mail/sendmail.pm > > I am getting the following error: > > E:\sea621\siebsrvr\BIN>emailmgr.pl > Can't locate Mail/Sendmail.pm in @INC (@INC contains: > E:/sea621/siebsrvr/BIN/lib > E:/sea621/siebsrvr/BIN/site/lib .) at E:\sea621\siebsrvr\BIN\emailmgr.pl > line 3 > 0. > BEGIN failed--compilation aborted at E:\sea621\siebsrvr\BIN\emailmgr.pl > line 30. > Either make a directory called Mail in E:/sea621/siebsrvr/BIN/site/lib and put Sendmail.pm in it or put the statement: use lib qw(E:/perl/lib); at the beginning of emailmgr.pl Todd W -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]