in reply to File::DosGlob
I have usually used glob() myself, but I read recently that it's not the best way to do it, that it has some quirks on different platforms. As for what those quirks are, I haven't a clue.opendir(DATADIR, "files/$department") or die "Invalid directory!"; @duplicate = readdir(DATADIR); closedir(DATADIR); foreach $item (@duplicate) { if ($item eq "files/$department/$number.txt") { $go_sub = 'yes'; last; } }
$go_sub = "yes" if -e "files/$department/$number.txt";
|
|---|