Southampton boss Ralph Hasenhuttl stuck by the players who have gotten the club to this stage of the competition, making nine changes to the side that beat Norwich City last Friday.
Perraud scored his first goal for Saints in spectacular to make it 1-0 against the run of play when he put his right foot through a shot across goal that Alphonse Areola had no chance of saving.
West Ham hit back on the hour mark through Michail Antonio, who capitalised on a goalkeeping error from Willy Caballero failing to keep hold of Declan Rice’s corner kick allowing the forward to fire in the rebound.
Second half substitute Armando Broja then won a penalty in the 69th minute after being brought down by Craig Dawson.
Following a lengthy VAR review, Andre Mariner had no choice but to point to the spot where Ward-Prowse coolly converted to restore Southampton’s lead at 2-1.
Nathan Redmond had a chance to firmly put Saints into the quarterfinals, but had his 86th-minute shot, which was earmarked for the top corner, punched behind by Areola.
Willy Caballero made point-blank save on Dawson approaching full-time before Broja curled a shot into the bottom corner to make it 3-1 at the other end to secure Southampton’s spot in the quarterfinals.
Southampton (4-4-2): Caballero; Perraud, Stephens, Valery, Walker-Peters (Livramento 58); Djenepo (S. Armstrong 45), Diallo (Romeu 90), Ward-Prowse, Smallbone (Redmond 81); A. Armstrong, Long (Broja 45)
Unused subs: Lewis (GK), Adams, Bednarek, Walcott
Goals: Perraud (31), Ward-Prowse (69 PEN), Broja (90+5)
Bookings: Perraud (85), Diallo (87)
West Ham (3-4-1-2): Areola; Diop, Zouma, Dawson; Fornals (Vlasic 76), Rice, Soucek (Benrahma 53), Johnson; Lanzini; Antonio, Bowen
Unused subs: Randolph (GK), Perkins, Ekwah, Chesters, Alese, Kral, Okoflex
Goals: Antonio (60)
Bookings: Dawson (68)