in reply to Why the error?

You probably also need a print $q->header in there somewhere...
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain