#!/usr/bin/perl use Win32::Process::Info; #Requests to use the Win32 Mod use Date::EzDate; #Requests to use the date mod use File::Copy; my $printinfo = Win32::Process::Info->new(); #Gets the system process info my @info = $printinfo->GetProcInfo(); #Stored to an array my $currentdate = Date::EzDate->new(); #Loads the current Date an Time # #Manageing Log Files Chronologically # $hour = 2; until ($hour > 26) #Loop to read all log files { opendir(LOGS, "/perl/ass/")|| die "dir not found"; #Opens the folder containing the days log files @logfiles = readdir(LOGS); #Puts the name of all files into an array closedir(LOGS); $currentlog = "/perl/ass/@logfiles[$hour]"; chmod (0777, $currentlog) or die "Can't change permissions: $!"; #Gives everyone all permissions on all files in the folder open(CURRENTLOG, $currentlog)|| die "file not found: $!"; $firstline = ; $date = substr($firstline,0 ,2); $hour++; }