sub CheckLogfileForToday() { my $today = (qw)[(localtime)[6]]; my $RegexObj = qr/^$today:/i; # compiles once per function call while () { if ($_ =~ $RegexObj) { } } } ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl