in reply to Perl Script to count files and directories is not working.
A short program is just a long program that isn't finished yet. Always use use warnings;. Always use use strict;.
Do that now, and see what progress you achieve.
Once you get past declaring $dir, $directory_count, $file_count and $outfile, you will discover that your for-loop is iterating over and undefined array, @dirs. Since @dirs is empty, you never enter the loop, so no print statements.
No, we can't re-write it for you, do your own homework.
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Script to count files and directories is not working.
by manu_06 (Novice) on Aug 26, 2010 at 19:16 UTC |