in reply to Re^2: Why is Stat() Not Stating All Files?
in thread Why is Stat() Not Stating All Files?

Did I apply the code correctly?
No. You're still testing the wrong file, you still need to prepend the directory in question, only now you filter out directories from the results of readdir (you're left with files only).

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re^3: Why is Stat() Not Stating All Files?

Replies are listed 'Best First'.
Re^4: Why is Stat() Not Stating All Files?
by awohld (Hermit) on May 02, 2005 at 21:45 UTC
    Ahh I got it, I chaged stat($file) to stat($dir.$file).

    Any idea how I can tell directories from files? I doesn't look like stat will tell that from what I can see.
      You know that grep part that you added? It's filtering out directories. `perldoc -f -X'

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.