Hi list, I've got a silly problem that for some reason I can't work out..the following program goes through a txt file that contain folder structures, e.g. j:\temp\ex\ I want the program too loop through the array, and give me all the files within those directories and their size...but sometimes it works, but most of the time it just says: can't stat etc and file not found...but I have used an example of c:\temp (which does exist) and has files in it...occasionally it works but mostly it doesn't...
Any reasons for why stat wouldn't work? #!/perl/bin -w use File::Find; open (DLIST, "c:/temp/dirlistforbatchcopy(pl).txt") || die "opening log file: $!"; open (DEST, ">c:/temp/DirList.txt") || die "opening log file: $!"; @DLISTCONTENTS=<DLIST>; sub getlist { { print DEST "$File::Find::name"; print DEST (stat($File::Find::name))[7]; print DEST "\n"; } } foreach $dirvalue ( @DLISTCONTENTS ) { find(\&getlist, $dirvalue); } close(DEST); close(DLIST); thanx Ben __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]