That is bad - Dryer usually runs on 208/240 voltage so it is across the two "line" rails if you have a 3 wire plug, 2 pins are "hot" and the 3rd is neutral if you have a 4 wire plug , 2 pins are "hot", the 3rd is neutral and the 4th is ground On a 3 wire plug the neutral is usually connected to the frame of the dryer
For it to shock you, you had to complete a circuit, so part of you must have been touching something else as well
SO get a meter ( places like harbor freight have them cheap) set the meter on the
250 volt scale and touch one lead to the case and the other to a nearby water pipe, If you see a voltage more than a few volts, you do have a problem. if the meter read near 120V, either your dryer, the outlet, or the breaker/fuse box is wired wrong. if the meter reads some voltage ( more than about 2V) then you have a significant ground loop or improper ground bonding in your breaker or fuse boxUnplug the dryer, change meter to continuity setting, touch the frame with one lead and the "L" or "O" shaped plug pin, the meter should beep, if not, your dryer has a connection problem. Now touch either of the flat pins, the meter should not beep. If it beeps, your dryer has a serious short, discontinue use and call an electrician.
I can tell you more things to test, but I would need to know how good you are with electricity first. If you are in the baltimore MD area, let me know