A student has threatened another student with a knife at a school in Perth.