http://www.perlmonks.org?node_id=1007002


in reply to List Contents of Windows Directory Folder

Hi mua,
Taking a leap from previous comments on this thread, maybe you want something like this:

use warnings; use strict; use File::Find; use File::stat; find( \&wanted, '.' ); sub wanted { return if $_ eq '.' or $_ eq '..'; my $st = stat($_); print sprintf "Filename: %s, Size: %s, Date Modified: %s\n", $_, $ +st->size, scalar localtime $st->mtime; }
When more files are added to this folder, I need to append to the current text file
Please, take a look at function open
Hope this helps

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me