The infinite perimeter arises from the assumption that coastlines can fract infinitely (as in fractals).
While mathematical fractals have infinite perimeter, coastlines eventually will just be bounded by the perimeter of all atoms on the coast combined.
So… No, they don’t.
But you might ask how do we know which atoms do we consider part of the coastline?
That, of course, is a question best left for a debate on ontology.