I commented out strict at my last compile, before posting, to debug with warnings.
Those pragmas should be used together, as apposed to either/or. The strict pragma would have told you about the @files problem I mentioned.
I tried using the stat functions, even POSIX, to no avail. It seems I'm getting further along by using the current method of extracting file data. However, I have only been able to produce the file name and size for output, excluding the creation time.
The stat function returns a 13 element list. The 11th element is the ctime, in Windows that's the file creation timestamp.
Why do you load 3 date/time modules but never use them?
The 3 modules are included because I reworked the code atleast 5 times, using those modules because processing must occur at timed intervals and paths/files have to be named as follows: yyyy\April\mm-dd-yyyy.
That could easily be accomplished with the strftime function in the POSIX module.
Why are you using printf without specifying a format?
A little confused on how to format my output for this output. Couldn't find anything similar on the net with mixed output, can you offer an example?
Read the perldoc for both printf and sprintf.
C:\>perldoc -f printf
C:\>perldoc -f sprintf
Array's are 0 indexed, meaning the first index is 0 not 1. "Off by 1" is the second most common mistake.
So should I preincrement instead of post increment? How will this make a difference since there should be a filename at 0. It should be file[0] = filename, correct? Please explain a little further.
You initialized $position to 0, then at the beginning of the loop, you increment it to 1. So, the first time you access the @fileSize array, you enter it at index 1, skipping over index 0.