#! /usr/local/bin/perl die unless chdir "/some/hardcoded/dir/here"; die unless opendir DIR, "."; foreach $file (grep {-f && (14 < -M)} readdir DIR) { unlink $file; } closedir DIR;