my $date = ...; if ( $date ge $begin and $date le $end ) { ... }