Committing perjury is against the law , and can be punished with a jail or prison sentence .
In the United States , for example , the general perjury statute under Federal law defines perjury as a felony and provides for a prison sentence of up to five years . In the United Kingdom a potential penalty for perjury is a prison sentence of up to 7 years .