Not to sound too off the beaten path, but if you were to use the module
Config::Simple and its
http syntax, an awful lot of the work will be done for you.
I'd also like to know where you're getting the "Day" field from. Is that a date the file was created? Is that a date embedded in the file the user creates? Expanding on that would help us all point to a solution.
dwm.