opendir AREA, "/files1/logs"; @job_logs = grep /job_log/, readdir AREA; print "Got my list of files\n"; while (<@job_logs>) { print "File: $_\n"; }