#!/usr/bin/perl if(opendir LOGS, "D:\\Log\\tmp"){ my @myfile = grep( /^*.tmp$/, readdir (LOGS)); foreach $file(@myfile){ my $result=-M $file; if( $result> 7){ unlink ($file); } } } closedir LOGS;
In reply to Why -M doesn't work? by xingjin3131
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |