EDIT 2018
Years later and the hobbyist microelectronics community has exploded thanks to the like of cheap and power embedded computers, like Raspberry Pi. This caused mechanical relays that work direct of GPIO on 5/3.3V allot cheaper and easier to get.
You can get them as singles or premade (Bangood, Seeedstudio, Gearbest, eBay, etc) ranging from 4 to 48 "channels" I have even seen. These are much more compact size, very affordable, safe and easy to use.

# * * * WARNING * * * #
Switching mains involves interfacing with potentially lethal voltages. Due care and competence is required. Death is possible. YMMV. This paraphrases Russell McMahon's advice on Electrical Engineering
---Original Answer 2012---
Well you could use a Solid State Relay which is much smaller and easier to control than a mechanical relay (The big 12 volt ones used in automotive industry) , using an MCU or in this case Pi's GPIO pin.

You have to drive the input pin constantly to keep the relay on (just like a mechanical relay). So if something fails with that signal, then the power goes off. To avoid that you have to design another circuit that can sustain itself.
But you can get these pretty cheap on eBay and they are completely safe (isolated), so they won't blow up the Pi and do not require a lot of power to drive them, about 3~10mA. Just check the details before buying one. It is also worth noting they can heat up if you load them heavily (close to the maximum rating)