Hello! I am currently working on a perl script that takes text files in a directory and pastes them into a webpage. This allows me to easily update the news on my site. I was able to get everything to work, but because it is news, I need the text files to be pasted onto the webpage in order of newest to latest and I cannot figure out how to do it. I currently name the text files in the following format, where 00-00-00 is the date:

00-00-00_File_Name_Here.txt

Could I use the titles to make the script order them? And if not, how else could I do it? Please look at what I already have of the script below, and let me know. Thanks!

I tried the script out with two different files per month and it seems to be working fine, although I think I am going to switch to the YYYYMMDD_File_Name_Here.txt just to be safe. While we are on the subject, I have another question. In each of my .txt files, I just write each news article in html because many of them use tables, etc. Is it possible to use a chomp feature so each file could look like this:

Article Title Article Date Source Everything below this point is the article