Either the husband or the wife has perjured himself.
Quite. One of those things that is very obviously wrong, once you bother to stop and think about it.
The commonest way to get around the gender problem here is to use singular they: ... Either the husband or the wife has perjured themself. Shakespeare used it; Jane Austen used it; loads of fine authors use it. Get used to it. And if you have a usage book like Strunk and White that declares singular they to be an error, throw that book away.
I'd changed my mind about this one before, and now I've just done it again. I have thought for a long time that anyone who claims that "they" may not be used singularly is being ridiculous, but I had thought that "he" could be used neutrally. No more. Language Log have got me convinced.