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


in reply to Fastest way to recurse through VERY LARGE directory tree

use File::Find;

It's fast enough, and will do the job for you.