Lightning flashed, thunder crashed and "Shepard, Gregory R" <gregory.r.shepard@
xo.com> whispered:
| while ($file=readdir DIR)
readdir() returns a filename, not a complete pathname. So, for example, if
you do a readdir("/etc"), you'll get back things like ".", "..", "passwd",
"shadow", "hosts", etc. If you happen to be in /var when you make the call
to readdir("/etc"), the stat will then try to get information on
"/var/passwd", "/var/hosts", etc. Most likely, these do not exist.
Before you do the opendir(DIR, "/etc") do a chdir("/etc"), then
opendir(DIR, ".") to make sure that everything is working on the same
current directory.
-spp
--
Stephen P Potter [EMAIL PROTECTED]
"You can't just magically invoke Larry and expect that to prove your point.
Or prove that you have a point." -Simon Cozens
UNIX, Perl, PHP, Web Consulting and Training http://www.unixlabs.net/~spp/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]