Juan B wrote:
> Ok I did it and know I get another error :-(
> here goes the error:
> Died at /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm
> line 284.
>
>
I don't have that module and therefore have no idea what line 284 is or
to what it applies, but here are a couple suggestions.
>
> this is the code:
> use strict;
> use warnings;
> use Mail::Mailer;
>
> my @lines = ();
> open (INFO, "/var/log/messages") or die "$!";
> while (my $line = <INFO>) {
> if ($line =~ /IDS/) {
> push @lines,$line;
> }
> }
> close INFO;
> if (@lines) {
> my $mailer = Mail::Mailer->new("smtp",
> "10.83.27.71");
>
You may not want to call the constructor directly and rather let the
underlying system handle it with a my $mailer = new Mail::Mailer(...)
> $mailer->open({
> 'From' => 'Syslog <[EMAIL PROTECTED]>',
> 'To' => 'gabriela pinado
> <[EMAIL PROTECTED]>',
> 'Subject' => 'PiX Detected Attack'
> });
> print $mailer @lines;
>
You're treating this array as a scalar...you're likely to get an e-mail
which contains nothing but an integer.
> $mailer->close or die "can't close mailer: $!";
> }
> ~
>
> please assist!
>
> thanks very much !
>
> Juan
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/