Nearly 40 homes have been burned down in wildfires tearing through farming areas north of the Western Australian, Perth.