Pete DeBoer wanted more shot attempts.

The Devils gave their coach more goals instead.

New Jersey’s best offensive performance in nearly a month, coupled with a second consecutive standout performance from goaltender Johan Hedberg, translated into a commanding 5-2 win over the Flyers last night in front of a sold-out crowd of 17,625 at the Prudential Center.

The Devils (13-9-5, 31 points) have won three of four after an 0-5-1 stretch, and moved into a sixth-place tie with the Maple Leafs.

“Like I said during the losing streak, I thought we played well enough to win some of those games,” DeBoer said. “For different reasons, they didn’t go our way. We felt if we would stick with it, try and keep a positive outlook, that it would turn, and it has.”

Prior to the game, DeBoer said his team needed to have more of a shooter’s mentality rather than waiting for the perfect opportunity. If the Devils can score goals at such a close ratio to their shot attempts, it won’t matter. Facing Ilya Bryzgalov, who allowed three goals on the first nine shots he saw, helped, too.

Adam Henrique scored twice and added an assist, Patrik Elias also scored and assisted on Henrique’s first goal, and Ilya Kovalchuk added his NHL-leading fourth shorthanded goal. Hedberg made 23 saves.

“I thought we played the right way from start to finish,” Henrique said. “We played a solid team game. We stuck to our system, we were getting pucks to the net, we got a couple of bounces our way. It’s a huge win for us.”