detect AC voltage

Coming from a different angle, could you use a small power transformer (like a mobile phone charger) to step the voltage down to 5V, then just detect it on a digital pin?

You'd have to hack up the power pack if you don't have a standard outlet, and I guess you'd have to be confident in your ability to work with high voltages.