proggybilly
Programmer
I am making the endeavor to learn perl. I have a project where I have a table in mysql that holds the names of servers along with a number indicating how recently they should have backed up. (i.e. servername=mail, days=2)
So I need to take that number of days (2), calculate the date from the current date, then search the system for a file with the word mail in it and if a file exists, check to see if it was created with in the last 2 days. If it has been created, display a Y, if a file doesn't exist or is older than two days, display a N.
I can connect to the database and pull in the data, I just don't know how to go about calculating the date and searching to compare.
So I need to take that number of days (2), calculate the date from the current date, then search the system for a file with the word mail in it and if a file exists, check to see if it was created with in the last 2 days. If it has been created, display a Y, if a file doesn't exist or is older than two days, display a N.
I can connect to the database and pull in the data, I just don't know how to go about calculating the date and searching to compare.