in reply to Re: Counting files in directory.
in thread Counting files in directory.

but I would like to the this counter while inside of the while loop.

Replies are listed 'Best First'.
Re^3: Counting files in directory.
by chromatic (Archbishop) on Sep 22, 2011 at 19:38 UTC

    Until you finish the loop, you don't how many files are in the directory. You have to count how many files are in the directory before you can say "x is file z of z."


    Improve your skills with Modern Perl: the free book.