Quique Sanchez Flores got the response he wanted from Watford as they avoided a second humiliation in four days by seeing off Swansea in the Carabao Cup.
Welbeck's opener was his first for the club and his first in 11 months. Although Swansea threatened an upset after Sam Surridge equalised, Pereyra had the final say to secure a first victory for Flores since he returned to the club.
Flores, who used his programme notes to again apologise to the Watford supporters who travelled to City and made 10 changes to his starting line-up, said: "The important thing was to win after the weekend.
"We felt the support from the fans so I say 'thank you' to them. It was a bad experience for all of us.
"I told the players we don't have reasons to be sad. We have reasons to react. We need to show everyone we can do much better.
"It's in the past and now we have another important game against Wolves in a few days."
Watford made the breakthrough in the 28th minute – which was around 10 minutes longer than it took City to score five on Saturday, when former England man Welbeck opened his account.
The 28-year-old, twice a League Cup winner with Manchester United, nodded in Pereyra's corner with the help of a deflection.
However, Watford's lead lasted just six minutes, Bournemouth loanee Surridge sliding in at the far post to convert Nathan Dyer's cross.
Swansea, among the Championship's early pace-setters, were inches from taking the lead when Connor Roberts' goalbound header was acrobatically cleared off the line by Christian Kabasele.
But the winner arrived with 11 minutes remaining, sub Gerard Deulofeu whipping in a low cross with Pereyra on hand to tap home.
Swansea boss Steve Cooper said: "The performance was much better than the result. We were the best team for large parts.
"Obviously we were disappointed to concede from a set-play, but we scored a good goal from the move of the match.
"We showed great bravery on the ball and wanted to win the game. I thought we were unlucky to lose."