1. Officer receives information $A through inadmissible means (which may be illegal, but not necessarily)
2. With information $A, officer is able to "prove" that a suspect perpetrated a given crime
3. Officer pieces together proof from possible unrelated, but admissible evidence - $B and $C, let's say.
4. And this is the part where I don't know that perjury is what we're talking about: Officer simply testifies to the truth of $B and $C, and that the suspect committed the crime in question.