Your skill will accomplish what the force of many cannot |
|
PerlMonks |
IO::Dir confusing behaviourby DaWolf (Curate) |
on Nov 21, 2001 at 18:43 UTC ( [id://126769]=perlquestion: print w/replies, xml ) | Need Help?? |
DaWolf has asked for the wisdom of the Perl Monks concerning the following question:
Hey fellas.
I'm using IO::Dir in a script. That script should simply show the files in a defined dir or if there aren't any, show a message telling the user. So, I did it this way: Well, how can this same code works in one kind of situation and don't work on other kind? When it works, it displays the "No files" message, but when it doesn't it just doesn't print anything. I would specify the situations here, but it is the same script, with the same empty directory, so why this is happenning? I found out that when it doesn't works is because of the . and the .. "entries" in NT, but then again it should never work, because NT always create this two "entries", right? And it's looking on the same dir anyways, so it just doesn't make any sense. Please help me here, fellas, because I just can't see any logic reason for this behaviour. Er Galvão Abbott a.k.a. Lobo, DaWolf Webdeveloper
Back to
Seekers of Perl Wisdom
|
|