in reply to Re^4: Ajax and CGI problem
in thread Ajax and CGI problem

Premature end of script headers is the error you get when you aren't printing headers; though it's not the only way to get it. Are you sure you are printing your call to $q->header? At this point, I would recommend adding-

use CGI::Carp qw( fatalsToBrowser warningsToBrowser );

-to the top of your script. But only in development. Never in production.