Next Program Repair Shop 52

FindLastOut

             sub FindLastOut {
                my $OutputDIR = shift;
                opendir (FINDLASTOUT_OUT,$OutputDIR);
                my @Files = readdir (FINDLASTOUT_OUT);
                closedir (FINDLASTOUT_OUT);
                my $Highest = 0;
                foreach my $File (@Files) {
                        next if $File eq '.' || $File eq '..';
                        next if $File !~ /\d/;
                        if (int(substr($File,0,5)) >= $Highest) {
                                $Highest = int(substr($File,0,5));
                        }
                }
                return $Highest;
             }


Next Copyright © 2002 M. J. Dominus