Assigning the answer of Solve to a variable [duplicate]

If I enter

Solve[(x-2)(x+2)==0,x]


then the answer comes up as

{{x -> 2}, {x -> -2}}


I want to make two variables sol1 and sol2, and sol1=2 and sol2=-2.

I don't mean I want to make sol1 and sol2 from {{x -> 2}, {x -> -2}}

I want to make them directly before anything such as {{x -> 2}, {x -> -2}} comes up.

As long as I get sol1 and sol2, I don't need such answers like {{x -> 2}, {x -> -2}}

I know it's possible because a year ago I could manage to do it after hours of trial-and-error.

But I don't remember now.

-

marked as duplicate by m_goldberg, Sjoerd C. de Vries, Artes, Michael E2, KubaDec 7 '13 at 15:52

This question was marked as an exact duplicate of an existing question.

{sol1, sol2} = x /. Solve[(x - 2) (x - 2) == 0, x] ? – Kuba Dec 7 '13 at 9:57
@Kuba Thank you very much! :) – iso Dec 7 '13 at 9:59
Specifically this section of the "pitfalls" question: Using the result of functions that return replacement rules – Michael E2 Dec 7 '13 at 13:46