Smelling perfume does not invalidate the fast. Smelling something does not necessarily entail that something with a perceptible body was inhaled. In the case of perfume there is no perceptible body to invalidate the fast.
It is not disliked to smell something when fasting. When fasting then you are not supposed to avoid smells that you may encounter throughout your day.
And Allah knows best