A pearl is an elegant, instructive and fun example of programming, which teaches important techniques and fundamental design principles.
For example, I really enjoyed the programming pearl Automata via Macros. It shows how to build a construct for finite state machines using Scheme macros, while touching upon the importance of tail-call optimization.
So, what's your favorite programming pearl?