There are exceptions.
*Vipers* all have vertical (the "correct" term is elliptical) pupils, but, the cobra relatives (cobras, kraits, coral snakes) have round ones.
My pythons, though, also have elliptical pupils, and they are non venomous.
As a rule of thumb, though, in North America, it is a safe assumption that, if it has elliptiacal pupils, it is venomous. If it has round pupils, remember this rhyme:
Red Touching Black; Venom Lack
Red Touching Yellow; Kill a Fellow
Coral snakes usually have a black head, and the red bands touch the yellow ones. Their milk snake lookalikes usually have red or yellow heads, with the red and yellow bands separated by black.
Hope this helps!!
The other rule of thumb: If you don't know; don't touch... 
-----
----------====================----------
Justin, Julie and the meangerie...
(Bobbing igs, snapping macklots, exploring ball, hungry kings, hyper grey rat, quacking tribs, hissing roaches, wriggling worms & chirping crickets)
Vermont Herpetological Society Online
www.vermontherps.org