Gianluca Scamacca scored for a third successive game as West Ham came from behind to beat Fulham.
But Pereira then fouled Craig Dawson from a corner, Jarrod Bowen scoring the penalty.
Scamacca missed a series of good chances but netted when it counted as he lobbed Bernd Leno, before a defensive mix-up presented Michail Antonio with the third.
Fulham took the lead with the first major attack of the game - Kurt Zouma failed to close down Pereira on the left side of the West Ham box, and the Brazilian beat u0141ukasz Fabianski for power with his shot high into the net from a tight angle.