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


in reply to Deleting old files from directory

Just need to know if this is efficient or if there is a better way of doing this.

It is more efficient to stat only once, ie

grep {-f $_ and 10 < -M _ }
stat, -X