What comes to mind is this goofy example -
I caved in from my diet and grabbed the Blue Bunny Bordeaux Cherry Chocolate ice cream sitting all by itself in the freezer.
Out of control, it was hard to stop eating it. Eventually I forced myself to shove it back in the fridge. Oddly, I felt like as if I had sinned. And perhaps I really did by gluttony. I wasn’t sure. I do know if I did sin, it wasn’t intentional. Perhaps this doesn’t relate to the question. Yet if I knew before hand I was going to overeat, knew it was a sin, and carelessly went ahead, then ‘yep!’ that is sin.
It’s just like drinking. If you know your going to get stoned if you start and know its a mortal sin, do it anyway, you’ve offended God.
To me, perceiving it as a sin is the same as knowing it is one. If one is unsure, it is best to avoid the thing until you know. Yet even if you were unsure and did not avoid it, you haven’t sinned because of ignorance.