Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Perl Script to count files and directories is not working.by psini (Deacon) |
on Aug 26, 2010 at 18:37 UTC ( [id://857538]=note: print w/replies, xml ) | Need Help?? |
First of all, use strictures (use strict; use warnings;)! This could show you some of the errors. You first initialize a scalar $dir with a path but then overwrite it with for $dir ( @dirs ) { extracting from an undefined array @dirs. you open and close OUTF, but then you print to stdout, so your output go to the shell and not to the log file. Update: I didn't notice you are a new user; welcome to the Monastery! Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In Section
Seekers of Perl Wisdom
|
|