Another technique is that if you can get the date/time string to look like this: "2011-10-01 1601" or similar, you can just use: $datetime1 cmp $datetime2. The key is that you need leading zeroes for the dates and times or the ascii sort order won't work out (07:02 is not the same as 7:02).
You will be ok on mtime, but see AnonMonk's post re:ctime.
In reply to Re^3: Ctime/Mtime compare with string date
by Marshall
in thread Ctime/Mtime compare with string date
by bimleshsharma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |