Persons convicted of perjury shall be punished by imprisonment in the penitentiary as follows: For perjury committed on the trial of any indictment for a capital offense or for any other felony, for a term not less than ten years; for perjury committed on any other judicial trial or inquiry, or in any other case, for a term not exceeding ten years.