Rarely is there better motivation than competition. However, in the job market today, I consider everyone to be my competition. Staying ahead and staying motivated are part of the load we programmers have to bear. Whenever I've been bored in my job, I've found that that is the best time to start looking into new technologies, methodologies, and theories regarding programming. I don't mean just Perl either. I made it throught one large period of system testing at work by learning Python. Another round, lead me to PHP (I'm still finding security holes in PHP-Nuke). Recently, frustrations in using Parse::RecDescent have lead me to the long journey of plugging the holes in my CS knowledge.
in reply to Second rate programmers and my confession
I have always worked under the assumption that there is always someone smarter, faster, and cheaper than me, and that my boss knows them personally. Keeping food on the table has always been all the motivation I've needed to keep working to improve my skills.