Here is what I am trying to do : I got software that runs under Sun Solaris + Windows NT. This software produces log-files and also log-directories, which are named for example
msg20010925 ( msg + year + month + day ). I am looking for a perl-script to "purge" away this files, specifying how much files/dir to keep. So far I already have a script thats working fine. Now I got a new version of my software. This guys changed the name of some log-files to msg20012509 (msg + year + day + month ) so my script doesnt work any longer, because I sorted the files by name and not by date:
open(DIRLIST,$dircmd) or die "Error ! \n" ;
$found = @filelist = (sort {$b cmp $a} <DIRLIST>);
I would a appreciate every suggestion how to solve this problem.
Andi
msg20010925 ( msg + year + month + day ). I am looking for a perl-script to "purge" away this files, specifying how much files/dir to keep. So far I already have a script thats working fine. Now I got a new version of my software. This guys changed the name of some log-files to msg20012509 (msg + year + day + month ) so my script doesnt work any longer, because I sorted the files by name and not by date:
open(DIRLIST,$dircmd) or die "Error ! \n" ;
$found = @filelist = (sort {$b cmp $a} <DIRLIST>);
I would a appreciate every suggestion how to solve this problem.
Andi