in reply to Re^2: Diff'ing dates
in thread Diff'ing dates (solved)

The exit code can be controled as follows:

END { exit 1+($epochs[0] <=> $epochs[1]) }
0: first time is earlier 1: both times are the same 2: second time is earlier
perl -MTime::Local -lane'END{exit 1+($d<=>0)}$F[1]--;$d+=($.*2-3)*time +local@F[5,4,3,2,1,6]'

Replies are listed 'Best First'.
Re^4: Diff'ing dates
by LighthouseJ (Sexton) on Oct 02, 2007 at 15:30 UTC
    Oh, I'm not interested in which is earlier, I know the second one will always be later (or the same) than the first. I'm more interested in the actual value of the difference but I can handle that easily enough.
    "The three principal virtues of a programmer are Laziness, Impatience, and Hubris. See the Camel Book for why." -- `man perl`