my @files; my $path = shift; opendir (DIR, $path) or die "Unable to open $path: $!"; my @files = # Third: Prepend the full path map { $path . '\\' . $_ } # Second: take out '.' and '..' grep { !/^\.{1,2}$/ } # First: get all files readdir (DIR); closedir (DIR);