Gregorian chants help keep me in the zone. Since I don't speak Latin, the lyrics don't compete for attention, and the cadence just oozes contemplation. Great for moderate, sustained frenzies. Philip Glass also works well.
Perotin is excellent polyphonic chant, and quite well-suited to Perl.
If I am working on a piece of code I know cold, I will listen to stuff I normally listen to, but if I need to think or develop something I find strive for the fine line where the music prevents me from total focus (I can concentrate on something too hard and blow it) but not active enough to make me lose track.
This is what I thought of when I read about the Gregorian chants.
I have found a nice way to hit that 'fine line' is with Kodo. Taiko drums can be very hypnotic if you don't concentrate on them, but they can also be distracting at times. A good mix:)