opendir(my $dh, '.') or die("Unable to list directory: $!\n"); my @searchlist = readdir($dh);