$fl=$ARGV[0]; @st=stat($fl); $timeout=30*24*60*60; if($st[9] < (time()-$timeout) and $st[10] < (time()-$timeout)) { unlink $fl; }