In addition to your books and newsgroups, you might want to add searching through the bundled, online documentation as part of your looking-things-up routine. In particular, perlfunc says, under the entry for readdir:
If you're planning to filetest the return values out of a readdir(), you'd
better prepend the directory in question. Otherwise, because we didn't
chdir() there, it would have been testing the wrong file.
| [reply] |