Genesis 38:13-30

13And when Tamar was told, “Your father-in-law is going up to Timnah to shear his sheep,” 14she took off her widow’s garments aand covered herself with a veil, wrapping herself up, and sat at the entrance to bEnaim, which is on the road to Timnah. For she saw that Shelah was grown up, cand she had not been given to him in marriage. 15When Judah saw her, he thought she was a prostitute, for she had covered her face. 16He turned to her at the roadside and said, “Come, let me come in to you,” for he did not know that she was his daughter-in-law. She said, “What will you give me, that you may come in to me?” 17He answered, “I will send you a young goat from the flock.” And she said, “If you give me a pledge, until you send it—” 18He said, “What pledge shall I give you?” She replied, d“Your signet and your cord and your staff that is in your hand.” So he gave them to her and went in to her, and she conceived by him. 19Then she arose and went away, and taking off eher veil she put on the garments of her widowhood.

20When Judah sent the young goat by his friend the Adullamite to take back the pledge from the woman’s hand, he did not find her. 21And he asked the men of the place, “Where is the cult prostitute
Hebrew sacred woman; a woman who served a pagan deity by prostitution; also verse 22
who was at gEnaim at the roadside?” And they said, “No cult prostitute has been here.”
22So he returned to Judah and said, “I have not found her. Also, the men of the place said, ‘No cult prostitute has been here.’” 23And Judah replied, “Let her keep the things as her own, or we shall be laughed at. You see, I sent this young goat, and you did not find her.”

24About three months later Judah was told, “Tamar your daughter-in-law hhas been immoral.
Or  has committed prostitution
Moreover, she is pregnant by immorality.”
Or  by prostitution
And Judah said, “Bring her out, and klet her be burned.”
25As she was being brought out, she sent word to her father-in-law, “By the man to whom these belong, I am pregnant.” And she said, “Please identify whose these are, lthe signet and the cord and the staff.” 26Then Judah identified them and said, m“She is more righteous than I, since nI did not give her to my son Shelah.” And he did not know her again.

27When the time of her labor came, there were twins in her womb. 28And when she was in labor, one put out a hand, and the midwife took and tied a scarlet thread on his hand, saying, “This one came out first.” 29But as he drew back his hand, behold, his brother came out. And she said, “What a breach you have made for yourself!” Therefore his name was called oPerez.
 Perez means a breach
30Afterward his brother came out with the scarlet thread on his hand, and his name was called qZerah.

Ruth 4:12

12and may your house be like the house of Perez, rwhom Tamar bore to Judah, because sof the offspring that the Lord will give you by this young woman.”

Matthew 1:3

3and tJudah the father of Perez and Zerah by Tamar, and Perez the father of Hezron, and Hezron the father of Ram,
Greek Aram; also verse 4
Copyright information for ESV