|Syntactic Confectionery Delight|
I have two personal anecdotes here:
First I read a lot. A lot of technical books, ORA and New Riders (for the Win stuff) dominate my bookshelf. When I was a kid in the early 80s I knew every idiotic "D&D" rule there was because I read those books (they weren't really "books" then) and learned everything about the game I could.
This rarely creates inspiration for me. In fact shortly after trudging through DNS and BIND I found myself thinking, "What the heck am I going to do with this information?"
Ulitmately I builta FreeBSD Box to host DNS in my house. (No really.) Well the point of this anecdote is I made a situation where I could use my new knowledge. BUT I was able leverage knowledge I had garnered before to do this. So reading a lot is/was good.
Second: When I got stumped as a Sys Admin, either with Lotus Notes or Perl I did this... I got on a train. Within a few minutes of riding a train the answer came to me. It got to the point where my boss actually considered buying a train seat for my office. (No really.) So by getting _away_ from the problem I was often able to "figure it out."
Beer and music are probably _not_ your friends for this endevour. I like beer and music as much as the next guy, believe me. There are many times I'd like to pull a Guinness and crank KoRn to destructive levels (oh wait that's just to get rid of the sales people) but I don't think that this will help you code. In fact, take this challenge: While you're sober go to FreePerlCode.com and randomly pick a script. Write it sober. It is irrelevant whether it works or not when you are done. Now do the same after a few pints and crank up the weird part of "Whole 'Lotta Love" and try it again. Report your results!
There's more than one way to do it, just don't use my way.