in reply to I want errors

Most likely you are having something fail and try to print an error message to the browser (if you are accessing the program through a web browser) before you print the http header which should come first.

Some things to check: check the file's permissions (755 or rwxr-xr-x), syntax (perl -c myfilename.cgi), perl location (which perl), and add a CGI header print statement at the top of it right after your shebang line (print "Content-type: text/html\n\n";). These examples are for Unix.