Can one get ocular herpes from touching a coldsore?

Yes. If you touch a fresh cold sore and then rub your eye with the same finger, it is certainly possible to transmit the virus to your eye. So whenever you have a cold sore, don't touch it! if you get them often, ask your doctor or a dermatologist for an antiviral medication (valtrex, famvir, (famciclovir) etc.) to heal them more quickly and prevent future attacks.