in reply to Directory checking on Windows XP

The usual suspect is that you're not in the directory you think you are in. Use the functions from the Cwd module (it's core) to check if that's the case.

Replies are listed 'Best First'.
Re^2: Directory checking on Windows XP
by ack (Deacon) on Sep 22, 2008 at 06:10 UTC

    Thank you, moritz, for you kind response. I apprecaite it very much, indeed.

    Turns out that my mistake was that I forgot to chomp() $entry before testing. apl suspected that could be the problem and, indeed, when I added that in, everything works just fine.

    It was such a rookie mistake and is one that I am embarassed to have made. I didn't realize that readdir() would put in the extra characters; but apparently it does.

    I just too focused on the details of what was being put into $entry (in terms of the interior characters) that I forgot to look at what was at the end. As part of my troubleshooting I normally am careful to put some sort of bracketing character (e.g., [ and ]) just for that very purpose. I broke my own process; and am embarassed at the consequences!

    Thank you, most sincerely, to everyone that responded. Your patience, help, and gentle responses were most kind. Your time and efforts are most appreciated.

    ack Albuquerque, NM