Mod 10 in Verlig

Hello,
I have a number like 39 and I want to seperate the digits of the number 3 and 9. So I wanted to use
39 % 10 = 9
39 / 10 = 3
So I had the two digits. But the problem is that you cannot use %10 in Veilog (the synthesizer raises an error), but you have to use base 2.
Now I don’t know how to do that with base 2.
Can anybody help me?

This sounds like a homework question to me. I’ll give you a hint: search for Binary Coded Decimal (BCD) converter.