This post: Is a metric space perfectly normal? answers a similar question, but the definition I have for "perfect normality" is that every two closed, disjoint sets $A$ and $B$ must be separated by a continuous function, i.e. there is a continuous $f:X\to [0,1]$ such that $A\subseteq f^{-1}(1)$ and $B\subseteq f^{-1}(0)$. This is fairly simple if $d(A,B)=\inf \{d(a,b):a\in A\land b\in B\}\neq 0$, but there are sets for which this is not the case. That is, if this value is non-zero, then I can use the function
$$ x\mapsto \frac{\min\{d(A,B),d(x,B)\}}{d(A,B)} $$ for the proof. This doesn't work if the distance between A and B is zero, however, as in the case of a non-connected metric space. I imagine there's a simple fix, but my brain's not seeing it, unfortunately. Any assistance?
Thank you!