Q: How did you learn to compose melody perfectly
A: the only perfect melody is silence, which is probably not what you were looking for in a melody. so if you think any melody is perfect, it just means they've tricked you into having so much fun that you didn't mind its problems, possibly even enjoyed its problems