sub is_poll_time { for (@_) { my $t = gmtime $_; return 1 if $t->min == $poll_minute; } return 0; } #### for my $poll_hour (0 .. 24) { # Process $poll_hour here }