Before you get a corn snake, find out everything you need to know about looking after one. You must prepare a suitable captive environment, find out where you can obtain the food it will need, get a vet who is knowledgeable about treating snakes and find out how long the snake is likely to live, so that you are aware of the long-term commitment. There are quite a lot of things to think about! Our non-domestic pet care section has care sheets that will give you some starting information.
Other useful information:
Exotic (non-domestic) pets and the Animal Welfare Act