http://www.perlmonks.org?node_id=178290


in reply to Question about - M

Yes, -M checks the age of the file (in days) since modification, so yes, the script would delete the file if it hadn't been modified within the past seven days since the script started. It should work on directories as well.