my $stime = gettimeofday; $body = lc($body); ## All whitespace and punctuation has been removed foreach $var ( @BD_data ) { my $sz = index ( $body, $var ); if ( $sz >= 0 ) { . . . last; } } my $looptime = gettimeofday - $stime; ## This value is logged!