in reply to
The PerlMonks algorithm
What would the PerlMonks say if they could see me coding this lousy shortcut?
Use my method, post it and find out ;-).
Seriously though, a short post in Code Catacombs is a great way to get input on your code. After incorporating other people's suggestions into the code, I've often found it has vastly improved and I've learned great deal more in the process than I would have if I just tried to improve it myself.
Either I found out that I was reinventing the wheel (higly un-popular sport, I have heard)
It's one of my favorite sports actually, far ahead of golf :). If you haven't already, take a look at Re-inventing the wheel is a 'Good Thing'.