Fun fact: in California and Idaho, it is a capital crime to commit perjury that results in a wrongful execution.
https://deathpenaltyinfo.org/crimes-punishable-death-penalty
https://deathpenaltyinfo.org/crimes-punishable-death-penalty
That would, in my non-lawyer eyes, make it incredibly hard to convict anyone of perjury as it seems you'd need to prove what was going on in the mind of the accused at the time, and good luck with that.
Rather than just if it results in execution, you'd think perjury resulting in jail time should mean the person lying should face the same jail term as the defendant.