  The overarching goal of this paper is to link the notion of sets of finite
perimeter (a concept associated with $N^{1,1}$-spaces) and the theory of heat
semigroups (a concept related to $N^{1,2}$-spaces) in the setting of metric
measure spaces whose measure is doubling and supports a $1$-Poincar\'e
inequality. We prove a characterization of sets of finite perimeter in terms of
a short time behavior of the heat semigroup in such metric spaces. We also give
a new characterization of ${\rm BV}$ functions in terms of a near-diagonal
energy in this general setting.
