A garden has the shape of a right-angled triangle with sides of length $30$, $40$ and $50$. A straight fence goes from the corner with the right-angle to a point on the opposite side, dividing the garden into two sections which have the same perimeter. How long is the fence?