Thank you. Very helpful.
For the record, I fixed it with :
while (my @row = $select_sth->fetchrow_array()) {
#split on colon,space,or dash
my @ticket_time = split /:|\s|-/, $row[1];
my ($Dd,$Dh,$Dm,$Ds) =
Delta_DHMS($ticket_time[0],$ticket_time[1],$ticket_time[2],$ti
+cket_time[3],$ticket_time[4],0,
$now_time[0],$now_time[1],$now_time[2],$now_time[3]
+,$now_time[4],0);
#my ($Dd,$Dh,$Dm,$Ds) = Delta_DHMS(@ticket_time,0,@now_time,0);
my $delta_hrs = $Dd * 24 + $Dh;
if ( $row[8] eq 'High' && $delta_hrs >= $thresholds{'High'}){
push @{$notify{'High'}}, \@row;
}elsif ( $row[8] eq 'Medium' && $delta_hrs >= $thresholds{'Medium'
+}){
push @{$notify{'Medium'}}, \@row;
}elsif( $row[8] eq 'Low' && $delta_hrs >= $thresholds{'Low'}){
push @{$notify{'Low'}}, \@row;
}
#debug/testing statement here.
warn "Time elapsed for ticket $row[0] of priority $row[8] is $delt
+a_hrs.";
}
|