in reply to CGI Login script error

Check the server logs.

One thing that can happen is that your database file can't be opened, in which case there are no headers printed.

Alternatively, you could also use CGI::Carp qw(fatalsToBrowser)