Perjury in simple terms means a crime in which a person has knowingly lied after taking an oath to tell the truth. Or when testifying in court through legal document like Affidavit. This lie must be material to the matter concerned so that it results in miscarriage of justice.
To further explain what kind of lies in court can attract perjury, as there is a broad set of lies which can attract perjury, the thumb rule is that to attract perjury such statement should satisfy following:
1. The statement was given when bound by oath. That means either during evidence stage after administration of oath or on a sworn affidavit.
2. That statment is false and the person giving such statement knew that such a statement is false. (unknowing lie or a make believe lie does not attarct perjury, I can explain this if someone is in any doubt as to what it means and if someone wants at a later stage.)
3. That statement was made intentionally to cause miscarriage of justice. (That means it touches the material point of the case in question, which can either mislead the court in passing orders, which can result in undue harm to other party or unlawful gains to the party giving statement. i.e. Knowing that A earns Rs. 5000/- and not entitled to any relief, A states under oath that he is unemployed. or A accuses B of beating him on X date and time at Y place, to get B imprisoned. Whereas there was no possibilty that B could have done so on X date and time at Y place as B on X date and time was at Z place which makes it impossible that B could have been at Y place also at the same date and time. or A states that he saw B doing a certain unlawful act at X date and time at Y place, whereas A himself at X date and time was at Z place, which means he could not have seen B committing any crime at Y place. Now all these conditions can cause miscarriage of justice.)
Hence, there would be certain lies which does not attract perjury, like A stating his wrong age in proceedings where whether A is 20 years old or 30 years old makes no difference.
Also, there is another interesting aspect, willful ommission. That means A though is earning Rs. 5000/- and not entitled to any relief, neither states that A is unemployed nor states his true income. Is that perjury? Yes, it is. If the express provision of the law provides that A is entitled for relief only if he is unemployed. i.e. In CrPC 125, the express provision of the law is that only the women who has no source of livelihood is entitled to claim maintenance. By not stating her income that woman is inducing the court to believe that she is not earning and thus liable for perjury. So these kind of ommissions can attract perjury on a case to case basis, however not always.