use Cwd; ... my $dir = getcwd; my @images = map { "$dir/$_" } readdir(DIR);