in reply to Perl List files in directory

If you're processing each file, might I recommend the amazingly good File::Find?
use strict; use warnings; use File::Find; find(&dostuff, '/opt/tmp'); sub dostuff { # $File::Find::name = /opt/tmp/foo # $_ = foo # $File::Find::dir = /opt/tmp }