find <dir> -mtime +30 -exec rm {} \;
No need for perl here let find do its job. =)

Waswas

In reply to Re: (1) line of sh vs (~20) lines of perl ? by waswas-fng
in thread (1) line of sh vs (~20) lines of perl ? by mandog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":