The Spaniard put Newcastle ahead on 27 minutes when he held off Maya Yoshida, before firing into the bottom corner.
Four minutes later Perez doubled Newcastle's advantage, getting on the end of Salomon Rondon's cross to finish.
In the second half, Southampton improved and pulled a goal back on 59 minutes through Mario Lemina, one of two half-time substitutes, who curled beyond Martin Dubravka.
Perez sealed the win and claimed the match ball when he diverted in Matt Ritchie's header on 86 minutes.
It secured a second successive win that lifts Newcastle to 12th on 41 points, 10 off the relegation zone.
Southampton are 16th with 36 points.
Newcastle: 27 April v Brighton (A)
Southampton: 23 Apr v Watford (A)