The result sees the Incas extend their unbeaten run to 15 matches, while the Swedes head to the tournament on a run of just one win in six.
Ricardo Gareca's men called the shots in the first half and came close to opening the scoring when Luis Advincula's surging run carved out a shooting opportunity for Jefferson Farfan, whose effort was parried away by the legs of Swedish goalkeeper Robin Olsen.
The Incas started the second period on the front foot and came close to a breakthrough when Yoshimar Yotun gained possession outside the box and shot towards the top corner, but Olsen met his effort with a strong hand.
Both Gareca and his opposite number Janne Andersson made extensive changes in the second period to assess their squads ahead of the finals, and the myriad substitutions disrupted the flow of the game.
Indeed, neither side created a clear-cut chance until the closing stages when Farfan missed the target with a header from close range.
Peru, who will make their first appearance at a World Cup finals since 1982, face France, Australia and Denmark in the group stage of the competition.
Meanwhile, Sweden are up against Mexico, South Korea and world champions Germany.
SWEDEN 4-4-2: Olsen; Augustinsson, Granqvist, Lindelof, Lustig (Krafth 70'); Forsberg (Rohden 85'), Ekdal (Hiljemark 82'), Larsson (Svensson 92'), Claesson; Berg, Toivonen (Thelin 75')
PERU 4-2-3-1: Gallese; Trauco, Rodriguez (Santamaria 81'), Ramos, Advincula; Yotun, Tapia (Aquino 75'); Cueva (Flores 77'), Farfan, Carrillo (Polo 84'); Guerrero