They mean the same, but they are not always used the same.
"Perhaps" is not used very often in spoken English where I am from. Almost always, "Maybe" is used.
"Perhaps" sounds somewhat poetic, and as such, it just seems a bit too much to use it in normal prose conversation. However; in written work, "Perhaps" may be used to give a bit more of a "I wonder" feel to the words. To me, it always feels a little more poetic, and a little more decorative to say "perhaps."