Genesis 38:26-30 TLV
Then Judah recognized them and said, “She is more righteous than I, since I didn’t give her to my son Shelah.” He was not intimate with her again.
Now when it was time for her to give birth, behold there were twins in her womb.
While she was giving birth, one stuck out his hand, and the midwife took a scarlet thread and tied it to his hand saying, “This one came out first.”
But as he was pulling his hand back in, behold, his brother came out. So she said, “How you have broken through! The breach is because of you.” And he named him Perez.
Afterward his brother, on whose hand was the scarlet thread, came out. And he named him Zerah.
TLV: Tree of Life Version