(1) Except as provided in subsection (2), whoever, in one or more official proceedings, willfully makes two or more material statements under oath which contradict each other, commits a felony of the third degree, punishable as provided in s. 775.082, s. 775.083, or s. 775.084. (2) Whoever, in one or more official proceedings that relate to the prosecution of a capital felony, willfully makes two or more material statements under oath which contradict each other, commits a felony of the second degree, punishable as provided in s. 775.082, s. 775.083, or s. 775.084. (3) In any prosecution for perjury under this section:
(a) The prosecution may proceed in a single count by setting forth the willful making of contradictory statements under oath and alleging in the alternative that one or more of them are false.
(b) The question of whether a statement was material is a question of law to be determined by the court.
(c) It is not necessary to prove which, if any, of the contradictory statements is not true.
(d) It is a defense that the accused believed each statement to be true at the time the statement was made.
(4) A person may not be prosecuted under this section for making contradictory statements in separate proceedings if the contradictory statement made in the most recent proceeding was made under a grant of immunity under s. 914.04; but such person may be prosecuted under s. 837.02 for any false statement made in that most recent proceeding, and the contradictory statements may be received against him or her upon any criminal investigation or proceeding for such perjury.