I highly doubt your snake 'learned' that the door opens by sliding. He's trying to get out most likely because he's not comfortable in his cage. Double check the temps and make sure he has several SECURE hiding spots. How big is this cage, and how big is the snake?
Also try the crumpled up newspaper trick. It helps snakes feel more secure.