Dozens of families are to be rehomed and a four-storey building demolished following a fatal fire in Perth.