What is the expiation for perjury?
Perjury is forbidden and one of the major sins that require turning to Allah in repentance, seeking His forgiveness, giving back rights to whom they belong, or seeking their forgiveness, and expiating for that oath.
Is it permissible for one to masturbate in order not to commit fornication?
This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.
What is the authenticity of the supplication: "O Allah, bring it upon us with blessings and faith, safety and Islam, and success in what You love and are pleased with. My Lord and your Lord is Allah"?
On the authority of Talhah Ibn Ubayd Allah (may Allah be pleased with him) who reported that the Prophet (PBUH) would say when he saw the crescent moon: "O Allah, let this moon appear over us with blessings and faith, safety and Islam. My Lord and your Lord is Allah."
This was narrated by Tirmidhi (Hadith no. 3451), who said: "It is a Hasan (good) Hadith."
And Allah The Almighty Knows Best.
Is wearing a cap permissible for boys, or girls?
All Perfect Praise is due to Allah, The Lord of The Worlds.
In principle, anything is permissible sol long as there is no Sharia evidence prohibiting it, thus wearing the cap by boys is permissible as long as it isn`t done in imitation of the disbelievers. Moreover, a Muslim woman should avoid all that which attracts the attention of men because whatever leads to the forbidden is forbidden. And Allah Knows Best.