Can someone please tell me the best (most efficient) way for setting a night time period to be between 8:30pm and 7am and then detecting when the program in question is running at night time. I got as far as writing:
my $time_now;
my $start_night_time; # Evening day 1
my $end_night_time; # Morning day 2