if ($request{'username'} eq $user && $request{'pass'} eq $pass)
Uses the AND operator:
&&
to compare two conditions.
It’s asking:
Is the word entered in the textbox named username the same as the word assigned to the variable $user?
AND
Is the word entered in the textbox named password the same as the word assigned to the variable $pass?
If both these things are true, then execute the code in the curly braces.