#
# Perl Script zum Suchen aller Module (*.pm *.pl)
for (@INC)
  { &scan_files($_); }
print "\n";
exit(0);

sub scan_files 
  {
  my (@files, $module, $count);
  my $scandir = shift;
  $count = 0;
  opendir(DIR,$scandir) || warn "can't open $scandir: $!\n";
  @files = grep (!(/^\./) && (/\.pm$|\.pl$/) && !(/\.\$\$\$$/) 
                 && -f "$scandir/$_", readdir(DIR));
  closedir (DIR);
  if ($#files > 0)
    {
    print "\n\n$scandir enthält die folgenden Module:\n";
    foreach $module(sort(@files))
      {
      $module = substr($module.' 'x20,0,20);
      print "$module\t";
      $count++; 
      print "\n" unless ($count % 3);
      }
    print "\n" if ($count % 3);
    }
  return 1;
  }

