Basically, they have the same meaning, and they are often used in one sentence: "Hogyne, persze!"
There is only a slight difference between the two words. Let me show it through grammar and some examples:
Hogyne! /Hogy (how) + ne (not)/ <-Denial in it
- Can you help me?
- Hogyne! = Of course, how could I not help you?!
Persze! <- Affirmative
- Can you help me?
- Persze! = Of course I can.
I hope the above helps. :)