(1) In any case in which a judge or person presiding in a court of record or a petty sessional court, or any person before whom a writ of inquiry is executed, is of opinion that any person has in any proceeding before him been guilty of perjury, he may order the prosecution of that person if there appears to be reasonable cause for such prosecution, and may commit him, or admit him to bail, to take his trial at the proper court; and may require any person to enter into a recognizance to prosecute or give evidence against the person so ordered to be prosecuted.(2) No such order as aforesaid shall be given in evidence upon any trial resulting from such order.