$cutover=(split /:/,$time)[0]; if ($date=~/\s(\d{2})/){ $hour=$1; } ... if ($hour > $cutover){