You're going to want to parse the date format into something nicer before you compare them. Comparing them as they are will not give the results you want:
Comparing "Jan 15, 2000" to "Apr 12, 2001" with cmp
will tell you that the April, 2001 date is before the Jan 2000 date.
My preference would be to combine the date and timestamp and convert it to a unix timestamp (seconds since Jan 1, 1970). Then you can just compare the timestamps numericly.
I like to use Time::ParseDate for these types of conversions.
Also, using split instead of the regular expression for your IP #'s will probably be quicker.