if ($line =~ /Entering UPAuthModule::authenticate/ .. /Sending Invalid credential/) { while ($line = <$log>) { #### if ($line =~ /Entering UPAuthModule::authenticate/ .. /Sending Invalid credential/) { while ($line = <$log>) {