Explore BrainMass

Perl script to list files (grouped by date) in a directory

I work in Unix environment. I have some file in my home directory. Some of the files are old and some new.
I need Perl script using which I can get the following result. This is just an example:

19-Dec-2009 (Date) 20-DEC-2009 ( Date)
========= ===============
ABC123 (name of file) PQR148 (name of file)
DEF456 (name of file) STU364 (name of file)
GHI789 (name of file) VWX786 (name of file)
JKL014 (name of file) YZA999 (name of file)
MNO259 (name of file) QTW168 (name of file)
================= =================
Total size of files in Total size of files in
Mega bytes for Mega bytes for
19-Dec-2009 20-Dec-2009

I need all the files listed in my home directory according to the date. Also displaying the total size in mega bytes for each day.

Solution Summary

Script in solution groups files according to last modification time of file, but it also provides instruction in case you want to group files according to last access time of file.