People often ask how to run a PowerBook with the lid closed. You can, if you connect a monitor and mouse, close the lid and restart, but here's an easier way that works on most new PowerBooks: There is a magnetic sensor that tells the machine the lid is closed and it should go to sleep.
On my 12" aluminum PowerBook, the sensor is on the right palmrest under the right arrow key, and there is a magnet on the lid in the corresponding position. Take a thin flat piece of steel, say 1" by 0.5" (a big paperclip works for me) and stick it to the magnet on the lid, then close the lid. The metal blocks the magnetism, and the PowerBook will not sleep! Great for carrying the book from place to place while it continues to run. Just be careful to use a piece of metal that won't scratch the machine's finish.
[robg adds: I haven't tested this one, and I'm not sure what the official Apple stance is on running the machine with the lid closed but the display active (which it would be unless you dimmed it, I believe). Proceed at your own risk. Given the minimal time it takes to sleep and wake under OS X, I'll personally stick with letting the machine go to sleep when the lid shuts.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=2003021813152137