Merriam Webster's defines "perchance" as:
"maybe but not definitely"
Similarly, the fifth definition of chance on Merriam Webster has "by chance" defined as:
"in the haphazard course of events"
The famous Shakespeare quote "to sleep, perchance to dream" would sound odd as "to sleep, by chance to dream." Conversely, I wouldn't think twice about asking someone either "do you by chance have a piece of gum," or "perchance do you have a piece of gum?" Would the second example be incorrect? I found this page from "The Grammarist" which would seem to indicate I'm using perchance wrong.
Both words are conditional words dependent on chance. Are they interchangeable, or only interchangeable in certain circumstances?