my $ac_date = convert($last); my $total = int (($to_date - $ac_date) /86400); if ($total > 10){ my ($detail,$usr,$ho,$no); $hoh {$detail} {'user_name'} = $user; $hoh {$detail} {'last_used'} = $last; $hoh {$detail} {'host_name'} = $host[1]; }