Why not use grep as Moritz pointed out? If you loaded the robot file into the @robots array, you would need to remove the newlines like
chomp(@robots) before you used it in the grep. Your date string could be stated like:
my ($day, $month, $year) = (localtime)[3..5];
# $date is YYMMDD format - you may want $day - 1?
my $date = sprintf "%02d%02d%02d", $year % 100, $month + 1, $day;
my $log_file_path = '/dt00mx84/LogArchive/www.ksdot.org/dt00mh77/';
my $log_file = $log_file_path . 'ex' . $date. '.log';
my $out_file = $log_file_path . $date. '.log';
Chris
Update: Not_a_Number nailed it. Didn't think about day-1 being yesterday.