Step 1: Identify direction vectors.
From first line:
\[
\vec{d_1} = (2,1,2).
\]
From second line:
\[
\vec{d_2} = (1,\lambda,1).
\]
Step 2: Use condition for perpendicular lines.
Two lines are perpendicular if:
\[
\vec{d_1} \cdot \vec{d_2} = 0.
\]
Step 3: Compute dot product.
\[
(2,1,2)\cdot(1,\lambda,1).
\]
\[
= 2(1) + 1(\lambda) + 2(1).
\]
\[
= 2 + \lambda + 2.
\]
\[
= \lambda + 4.
\]
Step 4: Apply perpendicular condition.
\[
\lambda + 4 = 0.
\]
Step 5: Solve for \( \lambda \).
\[
\lambda = -4.
\]
Step 6: Verify concept.
Dot product zero ensures angle between lines is \(90^\circ\).
Step 7: Final conclusion.
Thus, the required value is:
\[
\boxed{-4}.
\]