use IO::Dir; my @files = grep -f, IO::Dir->new(".")->read;