my @files = readdir(DIR) || die "Unable to read $workdir: $!\n";