Everything aside, you are definitely able to be a programmer. The fact that your boss expects that much from you does not mean you are a bad programmer. I have been developing websites for 8 years now (and have a degree in cs) and I wouldn’t know where to start on a perl project.
I’m sorry you’ve had to experience that type of work environment…sounds like a less than acceptable boss to me. I would not blame yourself at all.
That being said, it is an absolute must to read blog posts, stack overflow questions/answers, books…to become a decent dev. I’m not saying you need to work through handfuls of examples every night instead of enjoying some down time, but you do need to have the passion to want to learn and be a friend with google. Read as much as you want to but make sure you read a little every day.
I am no way near the level of expertise my “heroes” are but when I look back on my career, I realize that I have lived a great life outside of work AND I have become quite knowledgable when it comes to web dev. I definitely dont have “above avg intelligence” but I like programming, so much that I try to learn how to do it.
So, in short, hell yes you are good enough to be a programmer. No doubt in my mind.
In the words of Tupac, “You gotta keep your head up”.