Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm try to write a script that deletes files which are 7 days old (or older)
#!/usr/bin/perl chdir('/home/archive/logs/old'); @FileNum = system("ls -t -al") ; chomp($month = 'date +"%b" --date "7 day ago"'); chomp($date = 'date +"%d" --date "7 day ago"'); foreach (@FileNum) { if /how do I compar the date?? here { system(" rm $_"); } };
Can anyone help?