title: Perl Script: sorting through log files.
body: <p>Trying to write a script which opens a directory and reads bunch of multiple log files line by line and search for information such as example: 
   "Attendance = 0 " previously I have used <code>grep "Attendance ="</code> <code>*</code> to search my information but trying to write a script to search for my information. 
  Need your help to finish this task.</p>
  
  <pre><code>  #!/usr/bin/perl
  
    use strict;
    use warnings;
    my $dir = '/path/';
    opendir (DIR, $dir) or die $!;
    while (my $file = readdir(DIR))
     {
     print "$file\n";
     }
     closedir(DIR);
     exit 0;
  </code></pre>