8. If the lines $2 x+y-2=0$ and $x+m y-1=0$ are perpendicular to each other, then the distance from point $P(m, m)$ to the line $x+y+3=0$ is $\qquad$
8. $\frac{\sqrt{2}}{2}$.

It is easy to know that the slope of the line $2 x+y-2=0$ is $k_{1}=-2$, and the slope of the line $x+m y-1=0$ is $k_{2}=-\frac{1}{m}$.
Since the two lines are perpendicular to each other, we have
$$
(-2) \times\left(-\frac{1}{m}\right)=-1 \Rightarrow m=-2 \text {. }
$$

Thus, $P(-2,-2)$.
Therefore, the distance from point $P$ to the line $x+y+3=0$ is $\frac{|-2-2+3|}{\sqrt{2}}=\frac{\sqrt{2}}{2}$.