Jayson Werth doubled off Sam Dyson (0-2) to begin the ninth, with Perez being inserted as a pinch-runner. After Bryce Harper popped out, Ian Desmond was intentionally walked to set up a potential double play but, with Wilson Ramos at the plate, Perez and Desmond executed a double steal.
Ramos scorched a grounder to Coghlan, who misplayed the ball for an error as Perez scored the winning run in the 2013 home finale for the Nationals.
Justin Ruggiano homered, while Christian Yelich, Giancarlo Stanton and Adeiny Hechavarria each drove in a run for the Marlins.
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph
Campus cop fatally shoots Texas student during traffic stop