#!/usr/bin/perl use strict; use IntTest; use Time::Local; my ($mins, $days, $now, $then, $elapsed); ($now, $then) = @ARGV; if (!$now) {$now = "2013-0923";} if (!$then) {$then = "2013-1023";} $mins = tdiff($now, $then); #Removable code #1 # $mins = "$mins.00"; #Gap is the difference in minutes, so change it to days: $days = ($mins / 60) / 24; #Divide by days in a year so it can be used in interest formula $elapsed = $days/365; print "Now: $now, Then: $then, Minutes: $mins, Days: $days, Elapsed: $elapsed\n";