Help for this page
use strict; use warnings; ... my @files = grep { -f "$dir/$_" } read_dir($dir); # do something with files }