use OLE;
use LWP;
use WWW::Mechanize;
use Mail::Sender;
$url="http://operations/idslogs/latest.html";
# Create a new instance of WWW::Mechanize
# enabling autoheck checks each request to ensure it was successful,
# producing an error if not.
my $mechanize = WWW::Mechanize->new(autocheck => 1);
# Retrieve the page
@pagelist={'aps_2009-11-10_11-30-44-204.html'};
foreach $page (@pagelist){
$url="http://operations/idslogs/$pagelist[0]";
#$mechanize->get($url);
print $url;
# Assign the page content to $page
my $page = $mechanize->content;
my $ipcount=0;
my $match_count=()=($page=~/Memphis/g);{
print "Logins for Memphis $match_count\t";
}
my $actris_count=()=($page=~/ACTRIS/g);{
print "Logins for Austin $actris_count\t";
}
my $sef_count=()=($page=~/South East Florida/g);{
print "Logins for SEF $sef_count\t";
}
}
####
use IO::File;
$dir= shift || '.';
opendir DIR, $dir or die "Can't open directory $dir: $!\n";
while ($file= readdir DIR) {
next if $file=~/^\./;
open (FH, ">", "$file") or die "Can't open file $file: $!\n";
my @file_lines=;
foreach my $line (@file_lines) {
print $line "\n";
}
}
####
use:OLE;
use IO::File;
$dir= shift || '.';
opendir DIR, $dir or die "Can't open directory $dir: $!\n";
while ($file= readdir DIR) {
next if $file=~/^\./;
print $file;
open (FH, "$file") or die "Can't open file $file: $!\n";
my @file_lines=;
#close FH;
foreach my $line (@file_lines) {
chomp();
my $match_count=()=($line=~/Memphis/g);
my $actris_count=()=($line=~/ACTRIS/g);
my $sef_count=()=($line=~/South East Florida/g);{
}
}
}
print "Logins for Memphis $match_count \t", "Logins for Actris $actris_count \t", "Logins for SEF $sef_count\t";