Perth has sweltered through its hottest day so far this summer as temperatures soared into the 40s on Sunday afternoon.