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";