First thing is, the statement has to be with a specific governmental sphere, such as in a submission to a court, or a document with some legal weight submitted to a party where the government has mandated that the declaration be "sworn" (an employment application involving security clearances; a DMCA takedown notice which has a connection to copyright law).
Second, the statement has to be material, i.e. has "a natural tendency to influence, or is capable of influencing, the decision of the decision-making body to which it was addressed" Kungys v. US, 485 U.S. 759.
Third, you have to know that the statement is false (mistakes of knowledge are not perjury): the lie has to be willful.
Fourth, the statement has to be literally false (Bronston v. US, 409 U.S. 352). W.r.t. the Bronston standard, a desire to not reveal a fact when testifying in a proceeding does not render the statement perjurious, when the statement is literally true but incomplete, thus telling the whole truth is not required (attorneys are expected to detect incomplete responses and press the issue on things not said).
The edges of "literal truth" are a bit murky. What distinguishes Bronston from a number of cases of literally true perjury is that Bronston's testimony contained a clear sign that it was incomplete, but other "literally true" false statements (de Zarn, for example) contained nothing that an alert attorney could focus on. See US v. Robbins where defendant offered "11th and MacArthur" as the name of a corporation, the one in question, then falsely testified that it had no assets – the name of the corporation was actually "MacArthur and 11th Properties, Inc.".